I have an object that moves towards another object, a probe that moves towards a cube, I used a script for movement my problem is that my probe doesn’t stop when it reaches the cube but it keep going through it and I want it to stop. I’ve tried box collider, mesh collider rigid-bodies on both objects with no luck so far, my probe is inside a gameObject.
Any tips or guidance on how to stop my object going through the cube is really appreciated.
and In onTriggerEnter() write OnTriggerEnter(){ collisionOccured = true; }
. For triggerEnter your both bodies must have collider on them and atleast one of them should be a rigid body.