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

[3.3] Fix capsule-cylinder collision in godot physics #47085

Merged

Conversation

pouleyKetchoupp
Copy link
Contributor

Test specific axes before falling back to GJK-EPA algorithm to get more accurate separation axes for common cases, the same way it's done for cylinder-cylinder collision.

Fixes issues from #47067 (comment) & #47067 (comment)

3.3 backport of PR #47084

Test specific axes before falling back to GJK-EPA algorithm to get more
accurate separation axes for common cases, the same way it's done for
cylinder-cylinder collision.
@pouleyKetchoupp pouleyKetchoupp added this to the 3.3 milestone Mar 17, 2021
@pouleyKetchoupp pouleyKetchoupp requested a review from a team March 17, 2021 02:31

// Cylinder edge against capsule balls.

Vector3 capsule_A_axis = p_transform_a.basis.get_axis(2);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You're using get_axis(1) in the master PR, and get_axis(2) here. Is that expected?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comparing more of the two files it seems to be a common pattern so I guess it's on purpose.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah it's on purpose. It's because capsules have been changed to vertical direction on master.

@akien-mga akien-mga merged commit be64551 into godotengine:3.x Mar 17, 2021
@akien-mga
Copy link
Member

Thanks!

@pouleyKetchoupp pouleyKetchoupp deleted the cylinder-capsule-collision-fix-3.2 branch March 18, 2021 14:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants