#AnimationPlayer in between scenes

1 messages · Page 1 of 1 (latest)

tawny magnet
#

Never animate the root node's position, you can a child of the scene and it will work fine since it will be relative to it's parent's position

#

Consider making the root node something other than the Area, where the area is a child, or animate the collision shape instead

brazen hamlet
#

So I’ll have to use an animationplayer everytime I put a new pickup?

#

Wait, could I put the animation on the sprite, which is a child note of the area node?

prime rover
#

perhaps if you show the node tree, it would make the choice of which node to animate clearer

brazen hamlet
#

Yeah I can’t do that right now. I’m at work

#

But it’s something like this

-Area2D
-Sprite 2D
-Collision2D
-Particles2D
-AnimationPlayer

potent night
#

If I were you I'd go to the brackeys tutorial he just made and watch the platforms section. Do that way. Then you can just save the animation player as a scene so you don't have to actually touch it every time.

#

Basically make the animation player part of the root scene if you are sure that all instances will always be moving the same way

brazen hamlet
#

Thank you! Helps a lot

brazen hamlet
brazen hamlet
potent night
#

You can't just attach it to the animatablebody2d?

prime rover
#

try using a different root node for your object; Area2D is more of a property of, say, a Sprite2D or a Node2D