summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRémi Verschelde <remi@verschelde.fr>2021-05-17 10:37:35 +0200
committerGitHub <noreply@github.com>2021-05-17 10:37:35 +0200
commit2be9b5dec49ffb3122f766e1d4c9cd2088fde272 (patch)
treed7f97a5b60fb6887294203169ae83462fd1694f2
parent75622dae83415b9cf4a4f817b8ccfc9b925215fd (diff)
parentc8e402324e6942a09fd669f67a82567007521262 (diff)
Merge pull request #48775 from CaptainProton42/fix-prism-mesh-normals
Fix normals of PrismMesh
-rw-r--r--scene/resources/primitive_meshes.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/scene/resources/primitive_meshes.cpp b/scene/resources/primitive_meshes.cpp
index c3d84aeda2..64b43f82c6 100644
--- a/scene/resources/primitive_meshes.cpp
+++ b/scene/resources/primitive_meshes.cpp
@@ -1133,7 +1133,7 @@ void PrismMesh::_create_mesh_array(Array &p_arr) const {
Vector3 normal_left, normal_right;
normal_left = Vector3(-size.y, size.x * left_to_right, 0.0);
- normal_right = Vector3(size.y, size.x * left_to_right, 0.0);
+ normal_right = Vector3(size.y, size.x * (1.0 - left_to_right), 0.0);
normal_left.normalize();
normal_right.normalize();