Sergio Candela Ramírez(senorpotato)

Coin fade out, but its CollisionShape2D doesn't

Coin fade out, but its CollisionShape2D doesn't, so Player (aka, JumpyCube) can collide with the Collision shape as many times as he/she wants.

Because the Queue_free function that we add in the "Creating the fade animation" chapter only affects the coin sprite. Is there a way to deactivate a coin completely once it has been picked?


  • Nathan Lovato replied

    Hi Sergio,

    You must call that queue_free function on the Coin Area2D node for this to work. From the AnimationPlayer, when you create the call_func track, you want it to call functions on the Area2D node instead of the Sprite. That's it.

    By the way, you can ask questions directly from lessons. That way, other students will see which problem you faced and the solution right from the lesson!

  • s
    Sergio Candela Ramírez(senorpotato) replied

    Yup, that was it, I have done again the Fade out tutorial (The one where we add the queue_free) being very careful, and now it's working as intended..

    My mistake was that when you realize that the Area2D is not the one to be animated (instead, we ahould have animated the sprite node) I think I changed that in the other tracks too... Therefore, it was the sprite the one which was "queueing_free" and not the parent, so the CollisionShape was not dissapearing and so on...

    Thank you Nathan!