I have an object which contains three colliders inside its body:
Now, this object flies towards a sphere object with a sphere collider. That object has an OnTriggerEnter() function. Here is the object approaching the sphere collider:
From my understanding, the OnTriggerEnter() function should always detect Collider A first (assuming it arrives fairly head on!). However, this is not the case. The object in flight is moving fast, so each frame it jumps a fairly significant distance. Here is two frames forward:
This is where I am getting confused. OnTriggerEnter() has not been called yet, although it is clearly evident that a large part of the Colliders A, B and C have breached the sphere collider. Here is the next frame:
Now, OnTriggerEnter() has been called (I know this because I am viewing frame-by-frame in the inspector and log a message when the function is called). However, what is weird is that it has detected Collider B or C before A. How do I know this? Because I am logging a message depending on the collider “other”.
Can anyone explain why B or C would be detected before A? This seems very counter intuitive to me. Please help as it would be greatly appreciated!