Question by
unity_71B35089397E5C26A84F · Jun 30, 2021 at 10:49 AM ·
collisionempty
How to detect collision between moving rigidbody cube and static empty object?
Hi,
I am new to unity and working on collision detection.
I have a rigidbody cube and an empty object with a cube mesh. The rigidbody cube moves with arrow keys and the empty object is static. Both have a box collider.
How do I detect collision between this empty object and the rigidbody cube?
I am wondering whether it should be OnCollisionEnter or OnTriggerEnter and how to use the correct command.
Thank you for your help.
Comment