I have an infinitely bouncing ball simulation that works properly. The ball bounces around the screen borders forever.
One minor problem though is that if the starting impulse is too small the ball never bounces to begin with.
I experimented and eventually found that a starting impulse of at least 2.1 for my ball is required for it to bounce.
ball.physicsBody!.applyImpulse(CGVectorMake(-2.1, -2.1))
If I set the value to 2 the ball never starts bouncing it just stops at the bottom left corner.
ball.physicsBody!.applyImpulse(CGVectorMake(-2.0, -2.0)) //ball stops
I actually came across a question that answered this, but I forgot how to get to it. I know there is some lower limit that spritekit enforces to make a moving object stop when a collision occurs.
If I could get to that answer that would be great. Also if there is a way to override that, and make an object still bounce with a slower starting impulse that would be great too thanks.
edit: so I re-found the other question, SpriteKit ball loses all energy hitting wall, restitution=1
so my new question is, is there a way to set or lower the velocity threshold in sprite kit? I would like my ball to be able to move slower.
edit: anyone?