c3d.update

This callback should be used for updating the sceene and states of it. In a way it is similiar to render but it gets called even before that, and is provided with the average frame time.

arguments

local x = 0
function c3d.update(dt)
    epic_cube:reposition(x,0,1)

    if c3d.keyboard.is_down("a") then x = x - 1*dt end
    if c3d.keyboard.is_down("d") then x = x + 1*dt end
end