Move

Sets the position of an entity in 3-dimensional space, using local or global coordinates.

Syntax

Parameters

Example

--Create a window
window = Window:Create()
context = Context:Create(window)
world = World:Create()
local camera = Camera:Create()
camera:SetRotation(35,0,0)
camera:Move(0,0,-6)
local light = DirectionalLight:Create()
light:SetRotation(35,35,0)

--Create a model
model = Model:Box()
model:SetColor(0.0,0.0,1.0)
model:SetRotation(0,-90,0)

while true do
if window:Closed() or window:KeyHit(Key.Escape) then return false end

--Make the model move in a circle
model:Turn(0,Time:GetSpeed()*0.5,0);
model:Move(0,0,0.1);

Time:Update()
world:Update()
world:Render()
context:Sync()

end