diff options
author | RĂ©mi Verschelde <remi@verschelde.fr> | 2021-09-28 14:51:25 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-09-28 14:51:25 +0200 |
commit | 5aa099aaed359df6ff79fe31616b5601db2a42c5 (patch) | |
tree | 8bbaea13d1048329374a8635dadd8100a99af4a7 | |
parent | d18cbdf5e4a1132bfc5f581195f6bf7c3b9bed79 (diff) | |
parent | 7d53755ca70069602741761da46164e121cc1533 (diff) |
Merge pull request #53154 from drcd1/fix-sphere-normals
-rw-r--r-- | scene/resources/primitive_meshes.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/scene/resources/primitive_meshes.cpp b/scene/resources/primitive_meshes.cpp index 25eb701596..f8be00f5fb 100644 --- a/scene/resources/primitive_meshes.cpp +++ b/scene/resources/primitive_meshes.cpp @@ -1466,7 +1466,7 @@ void SphereMesh::_create_mesh_array(Array &p_arr) const { } else { Vector3 p = Vector3(x * radius * w, y, z * radius * w); points.push_back(p); - Vector3 normal = Vector3(x * radius * w * scale, y / scale, z * radius * w * scale); + Vector3 normal = Vector3(x * w * scale, radius * (y / scale), z * w * scale); normals.push_back(normal.normalized()); }; ADD_TANGENT(z, 0.0, -x, 1.0) |