SpriteKit Nodes Sticking to Edges of Scene / Not Bouncing SpriteKit Nodes Sticking to Edges of Scene / Not Bouncing xcode xcode

SpriteKit Nodes Sticking to Edges of Scene / Not Bouncing


As the guys mentioned, this answer could intuitively be seen as a step in the right direction, but the problem is with the whole SpriteKit physics engine. It is non-deterministic and fractions get lost in the calculation, causing imprecise simulation.

The short answer is to use Box2D instead. The hackish answer is to apply an impulse in the opposite direction.

All details are highlighted in my other answer.

@Jurik Glad I could help :)


Wrong initializer. There are 2 kinds of SKPhysicsBody - Volume-based and Edge-based. You are using the exactly wrong kind, which does not participant movement.

Please check out SKPhysicsBody Documentation.


The issue is severalfold and it has to do with shortcomings in the physics engine itself, however, I have managed to come up with a solution without requiring any third party software and that produces consistent results.

See my solution here: Accounting for Low Impact Angles/Velocities that Don't Register as Collisions