From f2d1383ba8dae6c03b680b3a84f8a4123e2e00e0 Mon Sep 17 00:00:00 2001 From: Relintai Date: Wed, 18 Aug 2021 18:45:40 +0200 Subject: [PATCH] Only transform the normal with the basis. --- prop_mesher.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/prop_mesher.cpp b/prop_mesher.cpp index 37f7183..0827b06 100644 --- a/prop_mesher.cpp +++ b/prop_mesher.cpp @@ -614,22 +614,22 @@ void PropMesher::add_tiled_wall_mesh_rect_simple(const int x, const int y, const int vc = get_vertex_count(); //x + 1, y - add_normal(transform.xform(Vector3(0, 0, -1))); + add_normal(transform.basis.xform(Vector3(0, 0, -1))); add_uv(transform_uv(Vector2(1, 1), texture_rect)); add_vertex(transform.xform(Vector3(x + 1, y, 0))); //x, y - add_normal(transform.xform(Vector3(0, 0, -1))); + add_normal(transform.basis.xform(Vector3(0, 0, -1))); add_uv(transform_uv(Vector2(0, 1), texture_rect)); add_vertex(transform.xform(Vector3(x, y, 0))); //x, y + 1 - add_normal(transform.xform(Vector3(0, 0, -1))); + add_normal(transform.basis.xform(Vector3(0, 0, -1))); add_uv(transform_uv(Vector2(0, 0), texture_rect)); add_vertex(transform.xform(Vector3(x, y + 1, 0))); //x + 1, y + 1 - add_normal(transform.xform(Vector3(0, 0, -1))); + add_normal(transform.basis.xform(Vector3(0, 0, -1))); add_uv(transform_uv(Vector2(1, 0), texture_rect)); add_vertex(transform.xform(Vector3(x + 1, y + 1, 0)));