Archive 17/01/2023.

Apply custom bone rotations on top of animation

TheComet

I have a model of a dog and it loops a walk animation. I’d like to procedurally bend his spine when he turns corners. What’s the best way to apply a rotation to a bone after the walk animation has been applied?

Dave82

Subscibe to the E_SCENEDRAWABLEUPDATEFINISHED and update your bones there.Please note this function is called after the scene update so if you disable scene updates (scene->SetUpdateEnabled(false))
E_SCENEDRAWABLEUPDATEFINISHED is still sent and processed

weitjong

If you want precise control on when it needs to be triggered, you may want to use animation triggering point. That can be declared in the animation XML file.

TheComet

Perfect, thanks!