Problem of Bounce a Ball with Edges

Topics: Developer Forum, Project Management Forum, User Forum
Oct 12, 2012 at 7:37 AM
Edited Oct 12, 2012 at 7:45 AM

I have a problem of bounce a ball to edges.

First, spawned 4 edges to surround game screen,

And throw my ball with to set velocity with apply some angle.

It normally work.

But bounce angle of after several hit edges is odd.

Just bounce straight hoizonal or vertical.

BTW hit a rectangle's corner, it bounce normally.

But after several hit the edges, it move staraight again.

My world's gravity is Zero and

here is my ball's setting.

CircleBody.BodyType = BodyType.Dynamic;
CircleBody.FixedRotation = true;
CircleBody.Restitution = 1.0f;
CircleBody.Inertia = 0.0f;

 

Then edges.

EdgeBody.BodyType = BodyType.Static;
EdgeBody.Restitution = 1.0f;
EdgeBody.Friction = 0.0f;
EdgeBody.TorqueDamping = 0.0f;
EdgeBody.Inertia = 0.0f;

 

How do I fix it?

Thanks.

Oct 12, 2012 at 8:23 AM
Edited Oct 12, 2012 at 8:23 AM



CircleBody.Friction = 0.0f;

 

Solved myself, missed to set friction zero.