aboutsummaryrefslogtreecommitdiff
path: root/src/touchscreengui.h
diff options
context:
space:
mode:
authorDániel Juhász <juhdanad@gmail.com>2017-08-24 06:31:33 +0000
committerLoïc Blot <nerzhul@users.noreply.github.com>2017-08-24 08:31:33 +0200
commit01c319d7784c3db614a53745e5af62c43cf45c90 (patch)
tree3896b4798fdfd5a5ac2408be73ad211f29e66df4 /src/touchscreengui.h
parent397a701f985f918cf8403802575045435de40c9a (diff)
downloadhax-minetest-server-01c319d7784c3db614a53745e5af62c43cf45c90.tar.gz
hax-minetest-server-01c319d7784c3db614a53745e5af62c43cf45c90.zip
Fix Android node selection distance (#6187)
Diffstat (limited to 'src/touchscreengui.h')
-rw-r--r--src/touchscreengui.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/touchscreengui.h b/src/touchscreengui.h
index 8dfec47d8..da97381cd 100644
--- a/src/touchscreengui.h
+++ b/src/touchscreengui.h
@@ -154,6 +154,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<f32> getShootline() { return m_shootline; }
void step(float dtime);
@@ -178,6 +186,12 @@ private:
double m_camera_yaw_change = 0.0;
double m_camera_pitch = 0.0;
+ /*!
+ * 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<f32> m_shootline;
int m_move_id = -1;