Sorry for the belated reply.

Here are the bounce functions, one's for ball vs ball, the other ball vs line respectively

void Ball::bounce(RigidBody &rigid, V2 &coll_vect){ V2 difference=rigid.getVelocity()-velocity; V2 contact_normal=coll_vect; contact_normal.normalize(); float dot=contact_normal.dot(difference); float mass_rat=(1+e)*(rigid.getMass()/(rigid.getMass()+mass)); if(dot>0){//if they are moving in the same direction c.p.x=c.p.x-mass_rat*contact_normal.x; c.p.y=c.p.y-mass_rat*contact_normal.y; } else{//bounce here correction.x=correction.x+(mass_rat*dot)*contact_normal.x; correction.y=correction.y+(mass_rat*dot)*contact_normal.y; } }

void Ball::bounceLine(V2 &point){ V2 coll_normal=c.p-point; float coll_n_len=coll_normal.mag(); coll_normal.normalize(); c.p.x+=coll_normal.x*(c.r-coll_n_len); c.p.y+=coll_normal.y*(c.r-coll_n_len); float dot=velocity.dot(coll_normal); correction.x-=(1+e)*(dot)*coll_normal.x; correction.y-=(1+e)*(dot)*coll_normal.y; }

As you can see it's the first function that's causing the jittering problem as it's impulse based while the other one ball vs line is after the fact position correction, that's why it's not jittering on the lines.

Any help would be greatly appreciated,

Thanks

Mike