summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--modules/gltf/gltf_document.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/gltf/gltf_document.cpp b/modules/gltf/gltf_document.cpp
index 0ed2100041..eece6afdcc 100644
--- a/modules/gltf/gltf_document.cpp
+++ b/modules/gltf/gltf_document.cpp
@@ -2796,7 +2796,7 @@ Error GLTFDocument::_parse_meshes(Ref<GLTFState> p_state) {
Vector<Vector3> normals = array[Mesh::ARRAY_NORMAL];
for (int k = 0; k < vertex_num; k++) {
- Vector3 tan = Vector3(normals[i].z, -normals[i].x, normals[i].y).cross(normals[k].normalized()).normalized();
+ Vector3 tan = Vector3(normals[k].z, -normals[k].x, normals[k].y).cross(normals[k].normalized()).normalized();
tangentsw[k * 4 + 0] = tan.x;
tangentsw[k * 4 + 1] = tan.y;
tangentsw[k * 4 + 2] = tan.z;