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 and clean disabled shapes handling in godot physics servers #49844

Merged
merged 1 commit into from
Jun 30, 2021

Conversation

pouleyKetchoupp
Copy link
Contributor

Addresses one of the issues from #49814:

with godot physics, disabled CollisionShapes are still hit (bug)

In 3D, disabled shapes are now not added to the broadphase anymore (same implementation as in 2D).
Since they are removed right away when disabled, no need to check for disabled shapes for any query that comes from the broadphase.
Also Fixes raycast queries returning disabled shapes.

In 2D, disabled shapes where already not added to the broadphase.
Remove the same unnecessary checks as in 3D.

Overall harmonized API for disabled shapes in the physics servers and removed duplicate method.

In 3D, disabled shapes are now not added to the broadphase anymore.
Since they are removed right away when disabled, no need to check for
disabled shapes for any query that comes from the broadphase.
Also Fixes raycast queries returning disabled shapes.

In 2D, disabled shapes where already not added to the broadphase.
Remove the same unnecessary checks as in 3D.

Overall harmonized API for disabled shapes in the physics servers and
removed duplicate method.
@akien-mga akien-mga merged commit 24c6ee9 into godotengine:master Jun 30, 2021
@akien-mga
Copy link
Member

Thanks!

@pouleyKetchoupp pouleyKetchoupp deleted the physics-disabled-shapes branch June 30, 2021 14:49
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