Hi,
I created a primitive capsule to use as a trigger for a script.
- isTrigger = true
- No rigid body
- Doesn’t move
My enemies:
- Have collider, not set as trigger
- Have a rigidbody - isKinematic = true
Everything worked as expected.
I then decided I would like to try a mesh-collider so I have more control over the shape/size of my trigger.
- Added mesh-collider (replaced capsule collider by GUI)
- Set as trigger
Now when my enemies move in to the colider, OnEnter is called as expected, but OnExit is called as the enemy moves inside the collider. As soon as the enemy no longer has direct contact with the mesh, it is considered OnExit, even though it is still in the volume of the mesh.
OnStay works only while the enemy collider is in contact with the mesh as well. once inside or outside, it does OnExit.
is this normal?
I tried every combination of triggers and rigidbodies but the trigger events are still acting differently than with a primitive collider.
Cheers,