Don't let the ball to fall under the ground

Discuss any questions about BEPUphysics or problems encountered.
Post Reply
DreamWeaver
Posts: 13
Joined: Wed Aug 31, 2011 9:47 pm

Don't let the ball to fall under the ground

Post by DreamWeaver »

I have a ball on the ground (just a box) and couple boxes tries to push the ball down with a power. It is expected that ball is always placed on the ground. But if one box push the ball strongly, it falls under the ground an due to gravity fly away to infinity space. I solve this situations with simple position check. But perhaps there is more robust way to do it?
Norbo
Site Admin
Posts: 4929
Joined: Tue Jul 04, 2006 4:45 am

Re: Don't let the ball to fall under the ground

Post by Norbo »

What you're seeing is likely a mass ratio issue. If you want the sphere to be able to stop the smashing boxes, the sphere must have high enough mass relative to the boxes and the strength of anything pushing the boxes. If the mass ratio is too different, the sphere becomes unable to fight the forces and will get pushed through the ground.

If the masses of the boxes aren't that high compared to the sphere but there's a motor pushing the boxes with a very strong force, the same problem can happen. The best way to solve this is to weaken the motor. Go into the motor's settings and adjust the maximum force and maybe the softness for a velocity motor or stiffness/damping for a servo. This thread has more information about configuring motors and joints in general: http://www.bepu-games.com/forums/viewto ... f=4&t=1324
Post Reply