Fix typo bug in heightmap shape

(cherry picked from commit 55eceb5150)
This commit is contained in:
Ricardo Buring 2022-12-10 12:57:43 +01:00 committed by Haoyu Qiu
parent 080104b18f
commit 7ccffd6bb8

View file

@ -1967,7 +1967,7 @@ void HeightMapShapeSW::_get_cell(const Vector3 &p_point, int &r_x, int &r_y, int
Vector3 clamped_point(p_point); Vector3 clamped_point(p_point);
clamped_point.x = CLAMP(p_point.x, pos_local.x, pos_local.x + aabb.size.x); clamped_point.x = CLAMP(p_point.x, pos_local.x, pos_local.x + aabb.size.x);
clamped_point.y = CLAMP(p_point.y, pos_local.y, pos_local.y + aabb.size.y); clamped_point.y = CLAMP(p_point.y, pos_local.y, pos_local.y + aabb.size.y);
clamped_point.z = CLAMP(p_point.z, pos_local.z, pos_local.x + aabb.size.z); clamped_point.z = CLAMP(p_point.z, pos_local.z, pos_local.z + aabb.size.z);
r_x = (clamped_point.x < 0.0) ? (clamped_point.x - 0.5) : (clamped_point.x + 0.5); 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); r_y = (clamped_point.y < 0.0) ? (clamped_point.y - 0.5) : (clamped_point.y + 0.5);