fix incorrect rescale of vec3

This commit is contained in:
Andrew Meadows 2014-05-02 22:27:52 -07:00
parent c8e56a97cc
commit 0e3d66caf6

View file

@ -652,7 +652,7 @@ bool sphereAACube(const glm::vec3& sphereCenter, float sphereRadius, const glm::
// sphere center is inside cube
// --> push out nearest face
glm::vec3 direction;
BA /= distance;
BA /= maxBA;
glm::modf(BA, direction);
direction = glm::normalize(direction);