mirror of
https://github.com/overte-org/overte.git
synced 2025-04-20 04:44:11 +02:00
Fix for mouse ray with off axis projection.
This commit is contained in:
parent
e437ae888b
commit
aa353a57ad
1 changed files with 1 additions and 1 deletions
|
@ -371,7 +371,7 @@ bool ViewFrustum::matches(const ViewFrustum& compareTo, bool debug) const {
|
|||
|
||||
void ViewFrustum::computePickRay(float x, float y, glm::vec3& origin, glm::vec3& direction) const {
|
||||
origin = _nearTopLeft + x*(_nearTopRight - _nearTopLeft) + y*(_nearBottomLeft - _nearTopLeft);
|
||||
direction = glm::normalize(origin - _position);
|
||||
direction = glm::normalize(origin - (_position + _orientation * _eyeOffsetPosition));
|
||||
}
|
||||
|
||||
void ViewFrustum::computeOffAxisFrustum(float& left, float& right, float& bottom, float& top, float& near, float& far,
|
||||
|
|
Loading…
Reference in a new issue