Unrealistic bouncing ball style bounces, why?

http://tim.kerchmar.com/prototypes/hockey.swf

Can anyone explain why the puck doesn't always bounce realistically, but instead will sometimes slide instead of bounce (particularly when bouncing along the Y axis (down the table and back to player))?

Code:
// Create border of boxes
var wallSd:b2PolygonDef = new b2PolygonDef();
var wallBd:b2BodyDef = new b2BodyDef();
var wallB:b2Body;

// 2.1M height, 1.2M width
var dimensions:Point = new Point(1.2, 2.1);
var wallThickness:Number = 0.1;

// Left
wallBd.position.Set(-wallThickness, dimensions.y * 0.5);
wallSd.SetAsBox(wallThickness, dimensions.y * 0.5 + wallThickness);
wallSd.friction = 0.0;
wallSd.restitution = 0.9;
wallB = m_world.CreateBody(wallBd);
wallB.CreateShape(wallSd);
wallB.SetMassFromShapes();
// Right
wallBd.position.Set(dimensions.x + wallThickness, dimensions.y * 0.5);
wallB = m_world.CreateBody(wallBd);
wallB.CreateShape(wallSd);
wallB.SetMassFromShapes();
// Top
wallBd.position.Set(dimensions.x * 0.5, -wallThickness);
wallSd.SetAsBox(dimensions.x * 0.5 + wallThickness, wallThickness);
wallB = m_world.CreateBody(wallBd);
wallB.CreateShape(wallSd);
wallB.SetMassFromShapes();
// Bottom
wallBd.position.Set(dimensions.x * 0.5, dimensions.y + wallThickness);
wallB = m_world.CreateBody(wallBd);
wallB.CreateShape(wallSd);
wallB.SetMassFromShapes();

// Create Paddle1's physics
var bodyDefC:b2BodyDef = new b2BodyDef();
bodyDefC.massData.mass = 1.0;
bodyDefC.position.Set(dimensions.x * 0.5, dimensions.y * 0.75);
bodyDefC.angle = 0.0;
bodyDefC.allowSleep = false;
bodyDefC.fixedRotation = true;

var circDef:b2CircleDef = new b2CircleDef();
circDef.radius = 0.09;
circDef.friction = 0.0;
circDef.restitution = 0.3;

var m_paddle1Body:b2Body = m_world.CreateBody(bodyDefC);
m_paddle1Body.CreateShape(circDef);

// Link mouse to Paddle1 with a b2MouseJoint
var m_mouseJoint:b2MouseJoint;
var md:b2MouseJointDef = new b2MouseJointDef();
md.body1 = m_world.GetGroundBody();
md.body2 = m_paddle1Body;
md.target.Set(dimensions.x * 0.5, dimensions.y * 0.75);
md.maxForce = 300.0 * md.body2.GetMass();
md.timeStep = m_timeStep;
m_mouseJoint = m_world.CreateJoint(md) as b2MouseJoint;

// Create Puck physics
bodyDefC.massData.mass = 0.2;
bodyDefC.position.Set(dimensions.x * 0.5, dimensions.y * 0.5);

circDef.radius = 0.1;
circDef.friction = 0.0;
circDef.restitution = 0.9;

var m_puckBody:b2Body = m_world.CreateBody(bodyDefC);
m_puckBody.CreateShape(circDef);
I wonder if this is a bug with fixed rotation. Does the problem go away if you turn that off?
hi,

i have same problems in c++...
for my training, i develop a little pong like, and i want to use box2D for several feature (ball, racket, bonus, wall etc etc).
When my ball collide with a wall and the angle is little, the ball don't bounce but slide.

For all objects i have a friction to 0.0f and a restitution to 1.0f

I don't understand why object slide 🙁

I can use contactlistener to manage impulse but i don't want to use this solution, normaly the ball must bounce

🙂

have you some idea ?

reagards.
i have found a clue in this post

viewtopic.php?f=3&t=3500

so i have modified b2_velocityThreshold, and now it's seem ok

🙂

you can try it for your hockey

Original thread: https://box2d.org/forum/viewtopic.php?t=3452