Fixed PlaneMesh tangents for 'Face X' orientation
(cherry picked from commit 6099d9f3d1
)
This commit is contained in:
parent
06d8262b57
commit
73b0984764
|
@ -1301,7 +1301,11 @@ void PlaneMesh::_create_mesh_array(Array &p_arr) const {
|
||||||
points.push_back(Vector3(-x, z, 0.0) + center_offset);
|
points.push_back(Vector3(-x, z, 0.0) + center_offset);
|
||||||
}
|
}
|
||||||
normals.push_back(normal);
|
normals.push_back(normal);
|
||||||
|
if (orientation == FACE_X) {
|
||||||
|
ADD_TANGENT(0.0, 0.0, -1.0, 1.0);
|
||||||
|
} else {
|
||||||
ADD_TANGENT(1.0, 0.0, 0.0, 1.0);
|
ADD_TANGENT(1.0, 0.0, 0.0, 1.0);
|
||||||
|
}
|
||||||
uvs.push_back(Vector2(1.0 - u, 1.0 - v)); /* 1.0 - uv to match orientation with Quad */
|
uvs.push_back(Vector2(1.0 - u, 1.0 - v)); /* 1.0 - uv to match orientation with Quad */
|
||||||
point++;
|
point++;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue