While I was messing with spritekit, I noticed that even the restitution is set to 1.0 (with linearDamping and friction both 0), if the node's velocity is small, it will not bounce. E.g. in the code below, I create an edge on the left, and have a ball hit the edge. I noticed that in the x direction, whenever the velocity is larger than 150, the ball will bounce; otherwise it'll just stick to the wall and stop moving. So I am wondering, is there a way to change this threshold so that the ball can bounce even with a low speed? Thanks!
self.physicsWorld.gravity = CGVectorMake(0, 0);
SKNode *leftEdge = [[SKNode alloc] init];
leftEdge.physicsBody = [SKPhysicsBody bodyWithEdgeFromPoint:CGPointZero toPoint:CGPointMake(0.0, self.size.height)];
leftEdge.position = CGPointZero;
[self addChild:leftEdge];
SKShapeNode *ball = [SKShapeNode shapeNodeWithCircleOfRadius:30];
ball.position = CGPointMake(self.size.width * 0.3, self.size.height * 0.5);
ball.physicsBody = [SKPhysicsBody bodyWithCircleOfRadius:30];
ball.physicsBody.velocity = CGVectorMake(-150, 0.0);//not bounce
ball.physicsBody.restitution = 1.0;
ball.physicsBody.friction = 0.0;
ball.physicsBody.linearDamping = 0.0;
[self addChild:ball];