Project::OSiRiON - Git repositories
Project::OSiRiON
News . About . Screenshots . Downloads . Forum . Wiki . Tracker . Git
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'src/client/targets.cc')
-rw-r--r--src/client/targets.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/client/targets.cc b/src/client/targets.cc
index 666ea6a..8dc5c07 100644
--- a/src/client/targets.cc
+++ b/src/client/targets.cc
@@ -290,8 +290,8 @@ void frame()
float z = -1;
// mouse cursor location in 3d world space
- float x = (float)(input::mouse_x - video::width /2) / (float)video::width;
- float y = (float)(input::mouse_y - video::height /2) / (float)video::height / render::Camera::aspect();
+ float x = (float)(input::mouse_position_x() - video::width /2) / (float)video::width;
+ float y = (float)(input::mouse_position_y() - video::height /2) / (float)video::height / render::Camera::aspect();
Vector3f cursor = render::Camera::eye() + render::Camera::axis().forward() * (render::Camera::frustum_front() + 0.001);
cursor -= render::Camera::axis().left() * x;