Hello everyone! The game has a SceneGraph system. Any GameObject object has local and world coordinates. The world coordinates are added up every time: 1. The object’s local coordinates have changed. 2. The parent of the object changes the local and world coordinates.
For physics to work correctly, objects must move in world coordinates. I initialize the Rigidbody (Box2D wrapper of the Body class) component and assign the Body.Position world coordinates. In the Update method, the GameObject object must be assigned new local coordinates after the physics calculation. But there is a problem: What should I do if a parent has changed their position?
Maybe someone had a similar problem?