Incorporating Object in Animation
If you have an animated character, you may want to incorporate some other object in its animation. For example you may want to give your character a sword. However, you want the sword to move when the animated character’s hand moves.
This is possible by taking advantage of the skeleton entity that is generated for you upon conversion.
🤺 The skeleton entity mirrors the skeleton, and all the bones of the skeleton fall underneath it. Those bone entities will be given the actual bones’ animated transforms at each frame.
If you add other entities in the skeleton entity hierarchy, those entities will be impacted by the animation as well.
🤺 If you want to give your character a sword, you could add a sword entity underneath its right hand bone, so that its transform is affected by the right hand bone animation.
For all this to work, just make sure that the skeleton root bone entity is well plugged into the animation controller in the “RootBoneEntityRef” slot (if not, just drag the entity to it). F.y.i. the root bone entity has a skeleton reference and a bone reference with a bone index of 0.
Example:
Problem: I want my sword to move with this animation…
Solution: