From: Daniel Karbach Date: Thu, 12 Mar 2015 23:16:28 +0000 (+0100) Subject: fix normal generated by chunk intersection test X-Git-Url: https://git.localhorst.tv/?a=commitdiff_plain;h=9c2baccb84195b7a2858c2b967c94d15cd31836b;p=blank.git fix normal generated by chunk intersection test --- diff --git a/src/chunk.cpp b/src/chunk.cpp index 4cabcec..f43f8fd 100644 --- a/src/chunk.cpp +++ b/src/chunk.cpp @@ -104,7 +104,7 @@ bool Chunk::Intersection( *dist = closest_dist; } if (normal) { - *normal = closest_normal; + *normal = glm::vec3(BlockAt(closest_id).Transform() * glm::vec4(closest_normal, 0.0f)); } return true; }