0 votes

I am trying to make a jump script where you cant jump again untill you collide with the ground or another object.
I've tried get_colliding_bodies(), tried using set_max_ocontects_reported(1) with it, I also tried func _on_Player_body_entered(body):
None of these have worked.
Is there anyway I can do this? Thanks in advance :)

asked Aug 25, 2019 in Engine by GoodClover (15 points)

1 Answer

+2 votes
Best answer

To enable contact reporting on a rigid body (2D or 3D), you must do the following:

  1. Enable contact_monitor.
  2. Set contacts_reported to a value > 0.
  3. Connect the body_entered signal.

If it's still not working, then you have something else wrong in your setup.

answered Aug 25, 2019 by kidscancode (17,762 points)
selected Aug 26, 2019 by GoodClover

Thanks :)
The problem was I hadn't enabled contact_monitor.

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read How to use this Q&A? before posting your first questions.