瀏覽代碼

Merge pull request #48775 from CaptainProton42/fix-prism-mesh-normals

Fix normals of PrismMesh
Rémi Verschelde 4 年之前
父節點
當前提交
2be9b5dec4
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      scene/resources/primitive_meshes.cpp

+ 1 - 1
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();