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

Dynamic BVH broadphase in 2D & 3D Godot Physics #48629

Merged
merged 1 commit into from
May 11, 2021

Conversation

pouleyKetchoupp
Copy link
Contributor

Port @lawnjelly's dynamic BVH implementation from 3.x to be used in both 2D and 3D broadphases.

Remove alternative broadphase implementations which are not meant to be used anymore since they are much slower.

Includes changes in Rect2, Vector2, Vector3 that help with the template implementation of the dynamic BVH by uniformizing the interface between 2D and 3D math (from PR #48314).

Dynamic BVH implementation originally made by @lawnjelly in PR #44901.
This PR only includes the changes in physics, the dynamic BVH is still not used in render.

Port lawnjelly's dynamic BVH implementation from 3.x to be used in
both 2D and 3D broadphases.

Removed alternative broadphase implementations which are not meant to be
used anymore since they are much slower.

Includes changes in Rect2, Vector2, Vector3 that help with the template
implementation of the dynamic BVH by uniformizing the interface between
2D and 3D math.

Co-authored-by: lawnjelly <[email protected]>
@lawnjelly
Copy link
Member

Preliminary look through it looks fine and quite straightforward (I'm assuming most of the BVH is the same so I'm just looking in detail at the interface with the existing 2d physics code). 👍

@akien-mga akien-mga merged commit 5f33951 into godotengine:master May 11, 2021
@akien-mga
Copy link
Member

Thanks!

@pouleyKetchoupp pouleyKetchoupp deleted the dynamic-bvh-broadphase-4.0 branch May 11, 2021 15:25

_FORCE_INLINE_ int max_axis() const {
return x < y ? 1 : 0;
}
Copy link
Member

@aaronfranke aaronfranke May 29, 2021

Choose a reason for hiding this comment

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

Note: This conflicted with #34005 (which I already rebased).

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.

4 participants