• Unity
  • How to split off sub parts of animation?

Related Discussions
...

Right now I have a character being animated that has balloons attached to her. For one of the animations her balloons fly off of her body. I would like these balloons to split off from her body and continue playing the animation.

Here is the problem, right now the balloons follow her root bone, so as they float off they float off relative to the root bone. Also when she turns around, because i'm utilizing FlipX, these balloons also flip along with her while there in the air. This looks really strange.

One way I thought of solving this was by using the SkeletonPartsRenderer. I went ahead and split her rendering into two parts, one for balloons splitting off, and one for the rest of her. This worked well because I am able to unparent the balloons splitting off, but the problem is that it still doesn't solve the Flip issue.

How would you guys recommend I achieve what i'm after. Currently I'm working in the Unity runtime btw.

Thanks in advance!

Edit:

There is also an issue where if I execute the same balloon falloff animation before the previous one is complete it will restart that first balloon falloff animation. I believe this is because no matter how many duplicate SkeletonPartsRenderers there are, they are all referencing the same SkeletonAnimation.

While that's a creative use of SkeletonPartsRenderer, I think it's ultimately not what you're looking for.

My inclination is to create separate objects for the balloons (if they have animations, a separate skeleton) since they are supposed to exist independent of the original skeleton. You would do the same for things like weapon bullets, arrows out of a bow, shadows, and many effects that behave better when played out in world space.

3 meses depois

Hmm ok that was my second thought.

When it comes to things like this, is there any easy way to coordinate the alignment between these two animations / skeletons so they line up perfectly?

Also should the new GameObject have the same skeleton with all the animations just playing the "balloon off" animation or should i create a whole new skeleton with only the balloon off animation in it?

Thanks in advance!

P.S. I looked pretty extensively for a use case like this in the examples and couldn't find one. It would be really awesome if you guys could add an example scene demoing this behavior; i suspect other people might run into this situation eventually 🙂.


Still having some trouble figuring out what would work best here. Any suggestions?

Thanks in advance!


Would love to get an answer on this as it's pretty essential to how we may have to handle animating one of our characters.

Thanks again!