Vizard 8 » Command Index » Vizard objects » node3d » <node3d:avatar>.setAnimationTime
8.0

<node3d:avatar>.setAnimationTime

Set the animation time

<node3d:avatar>.setAnimationTime(  
animation  
time  
)  
animation
Animation number
time
Time in seconds

Remarks

This command will set the current time of the animation. The time is specified in seconds and must be a value between 0 and the animations duration.

If the animation is 0, then this command will set the time of the avatars animation cycle.

If the animation ID is valid and it is currently being executed, then this command will set the time of the execution.

Return Value

None

Example

Setting Cycle Time
#Cycle animation 2
avatar.state(2)

#Set the animation time to 1.5 seconds into the cycle
avatar.setAnimationTime(0,1.5)


Setting Action Time
#Execute animation 5
avatar.execute(5)

#Pause the execution of animation 5
avatar.setAnimationSpeed(5,0)

#Set the time of the animation action to 2 seconds
#The avatar will be frozen in this position
avatar.setAnimationTime(5,2)

See also

<node3d:avatar>.getAnimationSpeed
<node3d:avatar>.getAnimationTime
<node3d:avatar>.setAnimationSpeed