-
Notifications
You must be signed in to change notification settings - Fork 55
Description
When I attempted to add friction to the simulator based on Equation (24), I observed that the sphere began to accelerate rapidly even with a small impulse. After thoroughly checking the implementation from beginning to end, I discovered that the issue might be caused by an incorrect calculation of the linear velocity at the point of contact. This resulted in the friction force being applied in a direction that inadvertently accelerated the ball’s rotation instead of opposing it.
After checking some references, I believe that the correct way to calculate linear velocity of contact point is m_angularVelocity.Cross(relativePosition) rather than relativePosition.Cross(m_angularVelocity) showed in the context .
I changed the velocity calculation using this approach and everything worked fine.
Last but not least, thank you for the book, I've learned a lot from it.
