I’m new to colliders and I’m having trouble getting them to work.
I have an empty game object with a box-collider component. It is parented to a player controller and therefore follows them around.
There are other empty game objects through the scene with box-collider components attached. They are static (not moving) and so a rigid body cannot be added to them.
I want to detect when the player-attached collider and the world colliders collide.
Note: Because I thought my terrain colliders (among others) might get in the way, I thought of suspending these other colliders 100m in the air along with the parented one.
I have tried using onCollisionEnter, but can’t seem to get it to work. I’ve tried different combinations of ‘is trigger’ as well. Please help!
Which one is the trigger? Which one should have the script attached? What should the script look like? Do either of them NEED to be tagged?
EDIT: ALSO! Please note I’ve considered using Vector distance, and when the distance between the two objects is less than a certain distance I could trigger the event that way, but there will be thousands of these floating game objects, and vector distance would probably use more processing power than onCollisionEnter + Exit… or would it?