PlayAnimation

This command makes an entity automatically play an animation sequence.

Syntax

Parameters

Example

window = Window:Create()

context = Context:Create(window)

world = World:Create()

camera = Camera:Create()
camera:Move(0,0.75,-2)

light = DirectionalLight:Create()
light:SetRotation(35,35,0)

--Load a model
model = Model:Load("Models/Characters/Crawler/crawler.mdl")

--Play an animation
model:PlayAnimation("Run",0.05)

while true do
if window:Closed() or window:KeyHit(Key.Escape) then break end
Time:Update()
world:Update()
world:Render()
context:Sync()
end