I’ve run into a really weird problem with the OnTriggerEnter functionality.
I have a simple cube with a trigger collider. It has a simple script that prints the name of each collider that triggers the cube.
I also have two objects to test triggering with. One is a simple capsule collider (a trigger too, for other reasons) that is parented to the ‘player’ object.
This capsule collider has a rigidbody because even though it doesn’t move at all by itself, it needs one to make its own trigger work properly (weird thing of Unity, but not a problem. Never really found an answer to that, too so if you know why, please do enlighten me)
The other object to test triggering with is a Character Controller, which means a capsule collider. And that’s when things start getting weird:
At first, everything worked perfectly fine. The cube-trigger was triggered properly by the character controller. I didn’t adjust any relevant settings of the colliders or anything in scripts that check the collision. But after some time and scripting in completely seperate scripts it suddenly stopped working.
Right now, when I jump my Character Controller into the cube-trigger. Nothing happens.
I have the functionality that puts the scale.y to 0.5 so the player can crouch. When I do this, though, it triggers! But the only difference is the scale of the object!
It’s driving me insane. The Character Controller is identical to the other capsule collider (which is working), but the Controller doesn’t work except when its scale has changed!
I doubt anyone has any idea to how to fix this. I hope it’s not some weird Unity engine glitch.