From 2c450ed93f0217d4950bcd4d2be3d5d1b92d7a2d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?D=C3=A1niel=20Juh=C3=A1sz?= Date: Thu, 24 Aug 2017 06:31:33 +0000 Subject: Fix Android node selection distance (#6187) --- src/touchscreengui.h | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'src/touchscreengui.h') diff --git a/src/touchscreengui.h b/src/touchscreengui.h index f4f1766c9..1f680ccb2 100644 --- a/src/touchscreengui.h +++ b/src/touchscreengui.h @@ -156,6 +156,14 @@ public: double getPitch() { return m_camera_pitch; } + /*! + * Returns a line which describes what the player is pointing at. + * The starting point and looking direction are significant, + * the line should be scaled to match its length to the actual distance + * the player can reach. + * The line starts at the camera and ends on the camera's far plane. + * The coordinates do not contain the camera offset. + */ line3d getShootline() { return m_shootline; } void step(float dtime); @@ -180,6 +188,12 @@ private: double m_camera_yaw_change; double m_camera_pitch; + /*! + * A line starting at the camera and pointing towards the + * selected object. + * The line ends on the camera's far plane. + * The coordinates do not contain the camera offset. + */ line3d m_shootline; rect m_control_pad_rect; -- cgit v1.2.3