Hello,
I would like to apply to some balls (rigidbody) the action apply_central_impulse(Vector2(0, -100)) when they hit a platform. I can get the name of the balls on the platform script but I don't know how to write the rest of the code in GDscript.
Thanks for your help!

Will @cybereality save me once again? ^^

  • According to that error message, the colliding body is a StaticBody2D, not a RigidBody2D. A StaticBody2D doesn't have an apply_central_impulse() method, since static bodies aren't intended to move.

According to that error message, the colliding body is a StaticBody2D, not a RigidBody2D. A StaticBody2D doesn't have an apply_central_impulse() method, since static bodies aren't intended to move.

    DaveTheCoder Thanks a lot!
    I didn't thought that the pb was due to the StaticBody2D ground under the plateform!
    Merci beaucoup 😉