Hello everyone,
I have just implemented the basic algorithm about rigid body simulation. Until now, I haven’t integrated joint constraints into my program, I just finished the non-penetration constraint. When I tested it with a box and a plane, the friction seemed ok. But, when I tested it with a sphere and a plane, there raised a problem.
When a sphere moves on the plane from +x to -x axis, assume that the linear velocity is (-1, 0, 0) and the angular velocity(0, 0, 1), and the radius of sphere is 1 unit, then according to the motion equation, the velocity of the contact point is v’ = v + w x r where r is vector from contact point to center of the sphere, for now, it is (0, -1, 0). And then v’ = (0, 0, 0). Using my PGS solver, the friction at the contact point is always zero. So the sphere will be rolling on the plane all the time. It is unreal, but I don’t kown how to fix it. Please help me.
A problem about Rigid Body
-
- Posts: 30
- Joined: Thu Oct 01, 2009 2:17 pm
A problem about Rigid Body
You do not have the required permissions to view the files attached to this post.
-
- Posts: 861
- Joined: Sun Jul 03, 2005 4:06 pm
- Location: Kirkland, WA
Re: A problem about Rigid Body
You must implement rolling friction. Usually people just use angular damping.
-
- Posts: 30
- Joined: Thu Oct 01, 2009 2:17 pm
Re: A problem about Rigid Body
Thank you. By the way, I wonder how bullet engine handle this kind of problem, rolling friction or angular damping.Dirk Gregorius wrote:You must implement rolling friction. Usually people just use angular damping.
-
- Posts: 861
- Joined: Sun Jul 03, 2005 4:06 pm
- Location: Kirkland, WA
Re: A problem about Rigid Body
I think Bullet just uses angular damping.
BTW: I remember a simple trick from university to model rolling friction. Just move the contact point a little forward. This small lever will create a torque and slow the ball down. Let me know if you try it and how it works.
BTW: I remember a simple trick from university to model rolling friction. Just move the contact point a little forward. This small lever will create a torque and slow the ball down. Let me know if you try it and how it works.