Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix solver contact normal for rotated child colliders #409

Merged
merged 1 commit into from
Jul 9, 2024

Conversation

Jondolf
Copy link
Owner

@Jondolf Jondolf commented Jul 9, 2024

Objective

Fixes #407.

The solver rework caused a regression where contact normals didn't take the rotation of child colliders into account in the contact solver, leading to buggy collisions.

Solution

Transform the normal correctly. Also remove unnecessary transformations of the normals of the individual contact points in the contact solver, as they are not used anywhere.

@Jondolf Jondolf added bugfix Fixes a bug solver Relates to constraints, joints or the solver labels Jul 9, 2024
@Jondolf Jondolf merged commit 803ec63 into main Jul 9, 2024
4 checks passed
@Jondolf Jondolf deleted the fix-contact-normal branch July 9, 2024 13:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bugfix Fixes a bug solver Relates to constraints, joints or the solver
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[2d] When Collider is rotated, collisions work incorrectly
1 participant