Page 1 of 1

Rolling sphere

Posted: Thu Aug 26, 2010 5:23 pm
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?

Re: Rolling sphere

Posted: Thu Aug 26, 2010 5:51 pm
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.

Re: Rolling sphere

Posted: Thu Aug 26, 2010 6:24 pm
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?

Re: Rolling sphere

Posted: Thu Aug 26, 2010 6:46 pm
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.