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

Add back global contact positions #86

Merged
merged 2 commits into from
Jul 18, 2023
Merged

Add back global contact positions #86

merged 2 commits into from
Jul 18, 2023

Conversation

Jondolf
Copy link
Owner

@Jondolf Jondolf commented Jul 18, 2023

#84 changed contact positions to be local in order to improve numerical stability. However, Contact should also have the global contact positions, as users and e.g. the debug plugin often need global coordinates, and it's unnecessry to do extra component queries just to convert into global coordinates manually.

This PR renames point1 and point2 to local_point1 and local_point2 and adds back the original point1 and point2 that were in global coordinates. This also fixes the debug plugin contact rendering, which was broken by #84.

`Contact` should have both the local and global contact positions,
as users and e.g. the debug plugin often need global coordinates.
@Jondolf Jondolf added C-Enhancement New feature or request bugfix A-Collision Relates to the broad phase, narrow phase, colliders, or other collision functionality labels Jul 18, 2023
@Jondolf Jondolf merged commit c2f83fd into main Jul 18, 2023
@Jondolf Jondolf deleted the global-contact-position branch July 18, 2023 20:10
@Jondolf Jondolf added C-Bug Something isn't working and removed bugfix labels Jul 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Collision Relates to the broad phase, narrow phase, colliders, or other collision functionality C-Bug Something isn't working C-Enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant