Bouncing spheres

Discuss any questions about BEPUphysics or problems encountered.
Post Reply
Rademanc
Posts: 16
Joined: Sat Apr 25, 2009 4:21 pm

Bouncing spheres

Post by Rademanc »

I have two spheres quite close to each other, and when the collide they really seem to bounce off each other with a lot of force.
I don't want them to bounce off each other quite that fast. I tried setting the bounciness on both of them, and played with the static and dynamic friction,
but I can't seem to make them bounce any less.
ball1= new Sphere(position + new Vector3(0.26f, 0.25f, 0.3f), 0.22f, 0.2f);
ball2= new Sphere(position + new Vector3(-0.26f, 0.25f, 0.3f), 0.22f, 0.2f);

c1 = new BallSocketJoint(box, ball1, position + new Vector3(0.26f, 0.25f, 0.25f), .2f, .2f);
c2 = new BallSocketJoint(box, ball2, position + new Vector3(-0.26f, 0.25f, 0.25f), .2f, .2f);
Norbo
Site Admin
Posts: 4929
Joined: Tue Jul 04, 2006 4:45 am

Re: Bouncing spheres

Post by Norbo »

There is actually a known bug that was introduced in the v0.10.1 version with the Sphere-Sphere special case. It's been fixed for the next version. In the mean time, you can disable the special case entirely to work around the problem.

Code: Select all

       space.simulationSettings.collisionDetection.specialCaseCollisionDetectionHandlers.Remove(new SimulationSettings.CollisionDetectionSettings.EntityTypePair(typeof(Sphere), typeof(Sphere)));
Sphere-sphere collisions will then resort to the default MPR/GJK collision detection system.
Rademanc
Posts: 16
Joined: Sat Apr 25, 2009 4:21 pm

Re: Bouncing spheres

Post by Rademanc »

Ok thanks. I will try it.
Post Reply