This commit is contained in:
Atlante45 2014-12-09 11:53:14 -08:00
parent a6f7a1ce15
commit eaaaa0687c

View file

@ -591,7 +591,7 @@ PickRay ViewFrustum::computePickRay(float x, float y) {
}
void ViewFrustum::computePickRay(float x, float y, glm::vec3& origin, glm::vec3& direction) const {
origin = _nearTopLeft + x*(_nearTopRight - _nearTopLeft) + y*(_nearBottomLeft - _nearTopLeft);
origin = _nearTopLeft + x * (_nearTopRight - _nearTopLeft) + y * (_nearBottomLeft - _nearTopLeft);
direction = glm::normalize(origin - (_position + _orientation * _eyeOffsetPosition));
}