1
votes

With Sprite Kit physics I have a simple setup with a ball bouncing inside a rectangular edge shape.

It all works fine, however the ball never comes to rest. The resting property is always NO and I can see that the ball animation keeps making a little bit of movement when it should be resting.

Sprite Kit is based on Box2D and here there is a doSleep option on the physics world, but I cannot find something similar with Sprite Kit.

What am I missing?

1
This may be what you're looking for...link0x141E

1 Answers

0
votes

You should use restitution. A property for setting the bounciness of the physics body in sprite kit. Actually, it is a property describing how much energy a body retains when it bounces off of another body. Dot operator can be used with the ball's sprite name to access the restitution property.