All Questions


posted to: Coding the Coin

Coin still returning to origin after changes when running the game

Even after fixing the animation to not reference the root Coin node, when running the project, all coins added to the level are still animating at the origin. if I move coins in the level scene while the game is running the coins display as expected where they are placed however they return to the origin when I rebuild the project. Also, playing the animation from editable children of the coins in the scene view for the level shows the expected behavior but it doesn't seem to translate when the project is run. Do you know why this may happen or how to fix it?

  • ensetsu replied

    I had this same issue, but I finally figured it out! I had to modify the 'RESET' animation so that it also referenced the coin Sprite position rather than the Coin Area2d. (note: my sprite node was labeled 'Sprite' instead of 'coin' as seen in the video)

  • Nathan Lovato replied

    Sorry for not getting back to you earlier - I'm currently on a family trip after 2 years not seeing my parents.

    I see, this is due to the reset animation feature added in Godot 3.4. As we made the course with an older version of Godot, it doesn't take that into account. I'll log a task to mention that under the corresponding video.