Attention | Topic was automatically imported from the old Question2Answer platform. | |
Asked By | J.B Stepan |
I have StaticBody 3D acting as a floor, how do I check if a the rigid body is colliding with it?
Attention | Topic was automatically imported from the old Question2Answer platform. | |
Asked By | J.B Stepan |
I have StaticBody 3D acting as a floor, how do I check if a the rigid body is colliding with it?
Reply From: | MrEliptik |
RigidBodies
can report collision. For that, you need to check contact_monitor
and set a number of contacts_reported
higher than 0.
After that, you can connect the body_entered
signal, which will report every body colliding with you RigidBody
.
I encourage you to check the docs for RigidBody
, there’s a lot of information: https://docs.godotengine.org/en/stable/classes/class_rigidbody.html#class-rigidbody-property-contact-monitor