diff options
author | Anilforextra <anilforextra@gmail.com> | 2021-09-21 00:33:52 +0545 |
---|---|---|
committer | Anilforextra <anilforextra@gmail.com> | 2021-09-21 21:14:17 +0545 |
commit | 90908cd67d3f44ba70cc4b7b32f024ce508cc0ee (patch) | |
tree | 4c3f64aa550e6dc763b9776dded65560b67db2cc /servers/physics_3d | |
parent | 87de2e7c4a38b1258d9a554c7f50cdbd8ac825fa (diff) |
Add Get Center Method for Rect2/Rect2i and AABB.
Diffstat (limited to 'servers/physics_3d')
-rw-r--r-- | servers/physics_3d/shape_3d_sw.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/servers/physics_3d/shape_3d_sw.cpp b/servers/physics_3d/shape_3d_sw.cpp index 1533d6e592..7deddb000e 100644 --- a/servers/physics_3d/shape_3d_sw.cpp +++ b/servers/physics_3d/shape_3d_sw.cpp @@ -1576,7 +1576,7 @@ void ConcavePolygonShape3DSW::_setup(const Vector<Vector3> &p_faces, bool p_back Face3 face(facesr[i * 3 + 0], facesr[i * 3 + 1], facesr[i * 3 + 2]); bvh_arrayw[i].aabb = face.get_aabb(); - bvh_arrayw[i].center = bvh_arrayw[i].aabb.position + bvh_arrayw[i].aabb.size * 0.5; + bvh_arrayw[i].center = bvh_arrayw[i].aabb.get_center(); bvh_arrayw[i].face_index = i; facesw[i].indices[0] = i * 3 + 0; facesw[i].indices[1] = i * 3 + 1; |