Rolling sphere

Discuss any questions about BEPUphysics or problems encountered.
Post Reply
jbosch
Posts: 43
Joined: Sat May 29, 2010 4:42 pm
Contact:

Rolling sphere

Post by jbosch »

Hi,

I launch a sphere but it never seems to roll. I tried to add dynamicFriction, staticFriction to the ball and also to the ground, but nothing seems to happen. What is the way to do this?
Jesús Bosch
XNA BLOG: http://geeks.ms/blogs/jbosch
Norbo
Site Admin
Posts: 4929
Joined: Tue Jul 04, 2006 4:45 am

Re: Rolling sphere

Post by Norbo »

Is the angular velocity actually zero all the time? If the coefficients of friction are sufficiently high, it should roll as expected. If they're too low, it will slide a while and slowly start rolling, and unless friction is zero, it will always roll some. Extremely high angular damping (close to 1) might also keep it from rolling much.

If it actually has zero velocity, ensure that nothing is setting its velocity to zero, and ensure the inertia tensor never gets set to the zero matrix.
jbosch
Posts: 43
Joined: Sat May 29, 2010 4:42 pm
Contact:

Re: Rolling sphere

Post by jbosch »

related to this, if I use "becomeKynematic", the objects loses their properties (like friction) or they keep those values to be taken in account again when "becomeDynamic" is called?
Jesús Bosch
XNA BLOG: http://geeks.ms/blogs/jbosch
Norbo
Site Admin
Posts: 4929
Joined: Tue Jul 04, 2006 4:45 am

Re: Rolling sphere

Post by Norbo »

Friction will be kept. It's used even when the entity is kinematic; imagine if another dynamic entity collided with the now-kinematic entity. Some properties like mass and inertia tensor will be recalculated. If modifications are made to the inertia tensor or mass prior to becoming dynamic or kinematic, they will be overwritten.
Post Reply