Posts

Post not yet marked as solved
10 Replies
It's an old post, but still in 2020 this is a problem. Pinned and non-dynamic PhysicsBodies drift over time.In case someone is still searching for a solution, I have a workaround.Previously, I had an SKNode with two child SKShapeNodes with PhysicsBodies. These nodes would drift apart over time.Now I have an SKNode with two child SKShapeNodes with empty child nodes, and the PhysicsBodies are in the empty nodes. In addition to this, I generate the PhysicsBodies only when they are needed. In my case, I have a tile based platformer, and only a 9 by 9 grid of tiles around the player have PhysicsBodies. This way the lifespan of the PhysicsBody is short, and they won't drift.This has solved the problem for me.