First off, there will be a new methods to override the animation currently playing on the avatar with a custom one. This will be a complete override, any IK for hand controllers/head tracking will be disabled. Once the animation is complete you can restore the MyAvatar back to it’s normal state animations.
MyAvatar.overrideAnimation(url, fps, loop, firstFrame, lastFrame); MyAvatar.restoreAnimation();
These replace MyAvatar.playAnimation and MyAvatar.stopAnimation.
Next, there will be new methods to override a specific “role” of the avatar, for example, “idle” or “walk” with a custom animation that you provide. This can be used to customize one particular aspect of an avatar without having to replace all of the animations.
MyAvatar.getAnimationRoles(); MyAvatar.overrideRoleAnimation(role, url, fps, loop, firstFrame, lastFrame) MyAvatar.restoreRoleAnimation(role)
The existing functionality of MyAvatar.setJointRotation will be preserved, however the coordinate space will be different, and I hope, more predictable. Instead of occurring in the pre-rotated frame, they will be in object space. Hopefully, this will simplify the process of setting joint rotations manually.
There is a WIP github pull request with the upcoming functionality. https://github.com/highfidelity/hifi/pull/6461
Any feedback or concerns?