I’m working on a flight sim project, and we use a “floating origin” system to move the world and all it’s contents closer to the origin to maintain floating-point precision.
I’ve noticed that rigid bodies don’t act exactly as they have in the past when their parent objects are moved. Some of our “moved” RBs are now snapping back to their world-space positions, particularly when set to Interpolate.
Can anybody chime in with knowledge of what may have changed here. This is subtle and unlikely to exhibit problems for most applications, but it’s killing us.
Are you using AddForceAtPosition. I am encountering an issue caused by floating origin messing up an applied forces position. It will make your craft spin violently when you do a floating origin move.
found some code that computes torque from force and was able to adapt it to work with local coordinates to compute an addtorque force that works without floating origin breaking it.
Actually, it has nothing to do with adding forces, etc. That all works fine in our situation. The change in behavior with Unity versions is that previously if I moved the root node of the world, the vehicle moved correctly along with it. Now, when our floating origin moves the root of the world, the vehicle restores itself to it’s previous world position the next frame. If I turn off the rigid body, this doesn’t happen.
I feel like there is a change to how/when the rigid body feeds the position back to the transform.