<node3d:avatar>.getAnimationTime

Returns animation time

 

<node3d:avatar>.getAnimationTime(
    animation    

)

 

animation

Animation number


Remarks

This command will return the current time of the animation.

If the animation is 0, then the time of the avatars animation cycle will be returned.

If the animation ID is valid and it is currently being executed, then the time of the animation action will be returned

If the animation ID is invalid or it is not currently being executed, then 0 will be returned

Return Value

Animation time

Example

Getting Cycle Time

avatar.state(2)

#Print current time of cycle when spacebar is pressed
def printCycleTime():
    print avatar.getAnimationTime(0)
vizact.onkeydown(' ',printCycleTime)


Getting Action Time

avatar.execute(6)

#Print current time of execution when spacebar is pressed
def printCycleTime():
    print avatar.getAnimationTime(6)
vizact.onkeydown(' ',printCycleTime)

See also

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