Skip to content

The linear velocity of contact point may be incorrect #8

@tzn893

Description

@tzn893

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 .

Image

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions