diff options
Diffstat (limited to 'src/client/targets.cc')
-rw-r--r-- | src/client/targets.cc | 4 |
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; |