0 votes

Hey everyone!
My Problem is that get_colliding_bodies() doenst seem to return anything, even, when i push the body around on the 2D world. Breakpoint 1 (marked in code below) is always hit, the second one never.

func _fixed_process(delta):
    var bodies = get_colliding_bodies()
    for i in bodies:                              #Breakpoint 1
        if(bodies[i].get_name() == "Player"):     #Breakpoint 2
            get_parent().get_node("Buttons").add_powerUp(self)
            self.queue_free()

fixed processing is obviously set to true.
Im kinda helpless. why does that happen? :|
-Manu

in Engine by (25 points)
edited by

1 Answer

+1 vote
Best answer

tick in contact_monitor to detect the colliding bodies.

by (57 points)
selected by

Thank you! I also had to change "Contact Reported" to a number higher than zero to make it work

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 Frequently asked questions and How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to [email protected] with your username.