#Conflicting animation player

3 messages · Page 1 of 1 (latest)

topaz oracle
#

I get the warning "Animation player on 36v0 has a conflicting animation player on an ancestor. Cannot safely animate." when having more than one AnimationPlayer in an entity hierarchy as pointed out in the warning message.

I've also found a change log entry for Bevy v0.10 stating that "Animation: AnimationPlayer that are on a child or descendant of another entity with another player will no longer be run."

Is it possible to for two entities in a parent-child hierarchy to be animated separately and if so, how it is done with only one AnimationPlayer in the entity hierarchy? (My assumption is that you need to have an AnimationPlayer component for each entity that you want to animate separately)

(My use case is a pirate ship with cannons that are animated to tilt up and down repeatedly as you keep the fire button pressed, and once the fire button is released the cannons are animated with a stretch and squash style animation as the cannon balls are fired. At the same time as the cannon balls are fired, I want the parent ship to be animated to recoil and rock back and forth for a short while.)

Thanks!

sharp heart
#

Just a thought but what if the cannons were a separate scene, maybe the fact that it has each scene has its own world would be enough to "separate" the animation players? If that wasn't possible, then another idea is to create a system that updates the cannon transforms to be at the correct position on the pirate ship without actually having them be a child of the ship.

topaz oracle
#

Thanks for the input @sharp heart

Not sure what the best thing would be. I must admit that I'm not familiar what separating scenes means in this case.

I'm also thinking of perhaps adding some simple spring like physics to generate the rocking back and forth.

But animations seems like a good fit, since I want to keep it as simple as possible.