summaryrefslogtreecommitdiff
path: root/servers/physics_3d
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2022-12-11 11:51:46 +0100
committerRémi Verschelde <rverschelde@gmail.com>2022-12-11 11:51:46 +0100
commit60a376ae521b6449b4e944ec9c0a450123f4b98e (patch)
treeca5f0fe5bb8adb88e3fbc856e318841e2d842863 /servers/physics_3d
parent1d19b0750e7d7f630ad3a55ef6fbc9d3ba6c8a94 (diff)
parent55eceb5150ee0c6b38f12f4be3fd601506959288 (diff)
Merge pull request #69852 from rburing/heightmap_shape_typo_bugfix
Fix typo bug in heightmap shape
Diffstat (limited to 'servers/physics_3d')
-rw-r--r--servers/physics_3d/godot_shape_3d.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/servers/physics_3d/godot_shape_3d.cpp b/servers/physics_3d/godot_shape_3d.cpp
index 22553bd3d8..1a016fbc72 100644
--- a/servers/physics_3d/godot_shape_3d.cpp
+++ b/servers/physics_3d/godot_shape_3d.cpp
@@ -1996,7 +1996,7 @@ void GodotHeightMapShape3D::_get_cell(const Vector3 &p_point, int &r_x, int &r_y
Vector3 clamped_point(p_point);
clamped_point.x = CLAMP(p_point.x, pos_local.x, pos_local.x + shape_aabb.size.x);
clamped_point.y = CLAMP(p_point.y, pos_local.y, pos_local.y + shape_aabb.size.y);
- clamped_point.z = CLAMP(p_point.z, pos_local.z, pos_local.x + shape_aabb.size.z);
+ clamped_point.z = CLAMP(p_point.z, pos_local.z, pos_local.z + shape_aabb.size.z);
r_x = (clamped_point.x < 0.0) ? (clamped_point.x - 0.5) : (clamped_point.x + 0.5);
r_y = (clamped_point.y < 0.0) ? (clamped_point.y - 0.5) : (clamped_point.y + 0.5);