Fix default findRayIntersection surfaceNormal to be in world space

This commit is contained in:
Ryan Huffman 2016-09-02 13:42:16 -07:00
parent b0c7e91737
commit da6afb605b

View file

@ -638,7 +638,7 @@ bool EntityTreeElement::findDetailedRayIntersection(const glm::vec3& origin, con
if (localDistance < distance && entity->getType() != EntityTypes::ParticleEffect) {
distance = localDistance;
face = localFace;
surfaceNormal = localSurfaceNormal;
surfaceNormal = glm::vec3(rotation * glm::vec4(localSurfaceNormal, 1.0f));
*intersectedObject = (void*)entity.get();
somethingIntersected = true;
}