PDA

View Full Version : Is there a way to get what animation an avatar is performing?


Enlil
03-04-2009, 07:29 AM
Hello,

Like the topic says, is there a good way to get what animation an avatar is currently performing? GetActionRunning and GetCycleRunning will both tell you if you are running a certain animation, but querying for all animations would be an extremely awkward way to get the animation you are doing. So, is there a better function?

Thanks,
Christian

Gladsomebeast
03-04-2009, 11:13 AM
You could create a sub-class of VizAvatar, override the execute/state function, and keep the last set animation in a field variable.

Because it is possible to have multiple animations going at once, the Vizard API only has this yes/no query function. I think its good because a boolean is simpler to deal with than a list of all running animations. Usually my program logic has been interested in if a animation is running, not in what the animation actually is. For clarity, it might be nice to re-name the function 'isCycleRunning' and adding a 'getCyclesRunning' to return a list.