summaryrefslogtreecommitdiff
path: root/doc/lua_api.txt
diff options
context:
space:
mode:
authorraymoo <uguu@installgentoo.com>2016-06-17 12:57:27 -0700
committerparamat <mat.gregory@virginmedia.com>2016-06-24 02:13:09 +0100
commitfa0bbbf96df17f0d7911274ea85e5c049c20d07b (patch)
tree90ffa15ba7e7b13ffa079d09d69bc97dfc2b2020 /doc/lua_api.txt
parent04fb10914c0d03ee77dafe610f336f23c58949ab (diff)
downloadminetest-fa0bbbf96df17f0d7911274ea85e5c049c20d07b.tar.gz
minetest-fa0bbbf96df17f0d7911274ea85e5c049c20d07b.tar.bz2
minetest-fa0bbbf96df17f0d7911274ea85e5c049c20d07b.zip
Player: New get_look, set_look API
Deprecate get_look / set_look pitch / yaw
Diffstat (limited to 'doc/lua_api.txt')
-rw-r--r--doc/lua_api.txt18
1 files changed, 14 insertions, 4 deletions
diff --git a/doc/lua_api.txt b/doc/lua_api.txt
index ed8f8504e..6d359379e 100644
--- a/doc/lua_api.txt
+++ b/doc/lua_api.txt
@@ -2679,10 +2679,20 @@ This is basically a reference to a C++ `ServerActiveObject`
* `get_player_velocity()`: returns `nil` if is not a player, otherwise a
table {x, y, z} representing the player's instantaneous velocity in nodes/s
* `get_look_dir()`: get camera direction as a unit vector
-* `get_look_pitch()`: pitch in radians
-* `get_look_yaw()`: yaw in radians (wraps around pretty randomly as of now)
-* `set_look_pitch(radians)`: sets look pitch
-* `set_look_yaw(radians)`: sets look yaw
+* `get_look_vertical()`: pitch in radians
+ * Angle ranges between -pi/2 and pi/2, which are straight up and down respectively.
+* `get_look_horizontal()`: yaw in radians
+ * Angle is counter-clockwise from the +z direction.
+* `set_look_vertical(radians)`: sets look pitch
+ * radians - Angle from looking forward, where positive is downwards.
+* `set_look_horizontal(radians)`: sets look yaw
+ * radians - Angle from the +z direction, where positive is counter-clockwise.
+* `get_look_pitch()`: pitch in radians - Deprecated as broken. Use get_look_vertical.
+ * Angle ranges between -pi/2 and pi/2, which are straight down and up respectively.
+* `get_look_yaw()`: yaw in radians - Deprecated as broken. Use get_look_horizontal.
+ * Angle is counter-clockwise from the +x direction.
+* `set_look_pitch(radians)`: sets look pitch - Deprecated. Use set_look_vertical.
+* `set_look_yaw(radians)`: sets look yaw - Deprecated. Use set_look_horizontal.
* `get_breath()`: returns players breath
* `set_breath(value)`: sets players breath
* values: