diff options
author | raymoo <uguu@installgentoo.com> | 2016-06-17 12:57:27 -0700 |
---|---|---|
committer | paramat <mat.gregory@virginmedia.com> | 2016-06-24 02:13:09 +0100 |
commit | fa0bbbf96df17f0d7911274ea85e5c049c20d07b (patch) | |
tree | 90ffa15ba7e7b13ffa079d09d69bc97dfc2b2020 /doc | |
parent | 04fb10914c0d03ee77dafe610f336f23c58949ab (diff) | |
download | minetest-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')
-rw-r--r-- | doc/lua_api.txt | 18 |
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: |