diff options
| author | Rémi Verschelde | 2017-07-03 23:43:33 +0200 |
|---|---|---|
| committer | GitHub | 2017-07-03 23:43:33 +0200 |
| commit | e54c7d5715e70c4ef08b6a3f7039c2bdf2473045 (patch) | |
| tree | f782dfef613af8fa5c211d7069e061e380a1f7c2 /editor/import/editor_import_collada.cpp | |
| parent | 2036273f944084ccbe2483619d4f4b3de48a322c (diff) | |
| parent | 44ecfb028d21975944b47b6496712a29f17f3848 (diff) | |
| download | godot-e54c7d5715e70c4ef08b6a3f7039c2bdf2473045.tar.gz godot-e54c7d5715e70c4ef08b6a3f7039c2bdf2473045.tar.zst godot-e54c7d5715e70c4ef08b6a3f7039c2bdf2473045.zip | |
Merge pull request #9457 from TwistedTwigleg/Fixed_Vector3_snap
Fixed syntax inconsistency in Vector3.snap and Vector3.snapped
Diffstat (limited to 'editor/import/editor_import_collada.cpp')
| -rw-r--r-- | editor/import/editor_import_collada.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/editor/import/editor_import_collada.cpp b/editor/import/editor_import_collada.cpp index 7948db379..7f91cc86c 100644 --- a/editor/import/editor_import_collada.cpp +++ b/editor/import/editor_import_collada.cpp @@ -554,10 +554,10 @@ static void _generate_tangents_and_binormals(const PoolVector<int> &p_indices, c tangent = Vector3(); } else { tangent = Vector3((t2 * x1 - t1 * x2) * r, (t2 * y1 - t1 * y2) * r, - (t2 * z1 - t1 * z2) * r) + (t2 * z1 - t1 * z2) * r) .normalized(); binormal = Vector3((s1 * x2 - s2 * x1) * r, (s1 * y2 - s2 * y1) * r, - (s1 * z2 - s2 * z1) * r) + (s1 * z2 - s2 * z1) * r) .normalized(); } @@ -867,7 +867,7 @@ Error ColladaImport::_create_mesh_surfaces(bool p_optimize, Ref<ArrayMesh> &p_me int normal_pos = (normal_src->stride ? normal_src->stride : 3) * p.indices[src + normal_ofs]; ERR_FAIL_INDEX_V(normal_pos, normal_src->array.size(), ERR_INVALID_DATA); vertex.normal = Vector3(normal_src->array[normal_pos + 0], normal_src->array[normal_pos + 1], normal_src->array[normal_pos + 2]); - vertex.normal = vertex.normal.snapped(0.001); + vertex.normal.snap(Vector3(0.001, 0.001, 0.001)); if (tangent_src && binormal_src) { |
