other.transform.position wrong in OnTriggerEnter(Collider other) callback

Hi everyone,

the red car in the following screenshot has a kinematic rigidbody and two convex mesh colliders set as triggers. I am pausing the editor via script as soon as the OnTriggerEnter callback fires.

It then prints the world position of the upper most parent of the other collider (the blue car) but as you can see on the screenshot: The position is different to the position shown in the inspector.

Can anyone explain to me why that is?

Thank you in advance for your help.

Of course. Just after I posted my question I came up with the thought that it might be related to the blue car’s rigidbody interpolation mode and indeed: When I change it from “Interpolate” to “None” the positions match.

However, that’s definitely not what I want. Is there a way to get the interpolated position of the blue car’s transform in an OnTriggerEnter event?

Okay, I am an idiot: :slight_smile:

rigidbody.position will return the uninterpolated position
rigidbody.transform.position will return the interpolated position (if interpolation was enabled on the Rigidbody)