I created a ball with friction 0.f and restitution 1.0, like this:
// Create shape definition and add to body
b2FixtureDef ballShapeDef;
ballShapeDef.shape = &circle;
ballShapeDef.density = 1.f;
ballShapeDef.friction = 0.f;
ballShapeDef.restitution = 1.0f;
//ballBodyDef.bullet = YES;
_ballFixture = ballBody->CreateFixture(&ballShapeDef);
// Give shape initial impulse...
b2Vec2 force = b2Vec2(0, 1.2f);
ballBody->ApplyLinearImpulse(force, ballBodyDef.position);
The ball bounces nicely off the walls when collision happened. But it will slide like on ice when collided with a gradual slope, like this:
And the incline's physics properties are: Density:1 Friction:0 Restitution:1
How can I do to make the ball bounce away from the slope?