0 votes

I have multiple rigidbody object floating away in the space. When they hit each other, they push away each. I want to destroy object if they hit something, but connect body_entered signal won't invoked when they impact each other:

func _ready():
    connect("body_entered", self, "destroy")

func destroy(body):
    print("HIT!")
    queue_free()

How do I check Rigidbody hit something?

in Engine by (132 points)

1 Answer

+2 votes
Best answer

In RigidBody node, Set Contact Monitor to true and change value of Contacts Reported to greater than 0 now it works.

by (132 points)
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.
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 webmaster@godotengine.org with your username.

Categories