Attention | Topic was automatically imported from the old Question2Answer platform. | |
Asked By | SebSharper |
Hi there.
I have a sprite with an AnimationPlayer as a child of it, along with another sprites too. The AnimationPlayer animates the main sprite (parent) but I need it to animate the other sprite nodes too (children). I already have the animations made for the parent sprite, the issue is that I want to use the exact same animations but with the other children sprites. As Godot does not have a copy/paste keyframes in different track feature, I was thinking about setting the children’s frame value the same as the parent sprite’s animated frame value in process() function, but that may produce a bad perfomance, so I was wondering if there is a signal or a way to know when does the frame property in the parent sprite changes value to set it to the children sprites too.
Would it be possible to instance the animation player as a child scene or several children of the original animation player? Something like this:
And start them all at the same time?
MRimmer | 2020-11-13 16:20
So you’re suggesting that I add an AnimationPlayer as a child of the already existing animation player for each of the sprites that I want to animate, just change the target to the corresponding node and the properties should change just like when changing the position of a parent node changes the children’s position too?
SebSharper | 2020-11-13 21:57