SetAnimationFrame

Sets an entity to a specific animation frame.

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,-3)
local light = DirectionalLight:Create()
light:SetRotation(35,35,0)

--Load a model
model = Model:Load("Models/Trees/pine01.mdl")
while true do
if window:Closed() or window:KeyHit(Key.Escape) then return false end

model:SetAnimationFrame(Time:GetCurrent()/100.0,1,2)

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