1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-07 12:30:27 +00:00

Support for Dynamic BVH as 2D Physics broadphase

List of changes:
- Modified bvh class to handle 2D and 3D as a template
- Changes in Rect2, Vector2, Vector3 interface to uniformize template
calls
- New option in Project Settings to enable BVH for 2D Physics (enabled
by default like in 3D)
This commit is contained in:
PouleyKetchoupp
2021-04-27 13:56:23 -07:00
parent 595a74ca79
commit d8f681029f
26 changed files with 425 additions and 173 deletions

View File

@@ -54,15 +54,6 @@ real_t Vector3::get_axis(int p_axis) const {
return operator[](p_axis);
}
int Vector3::min_axis() const {
return x < y ? (x < z ? 0 : 2) : (y < z ? 1 : 2);
}
int Vector3::max_axis() const {
return x < y ? (y < z ? 2 : 1) : (x < z ? 2 : 0);
}
void Vector3::snap(Vector3 p_val) {
x = Math::stepify(x, p_val.x);