diff options
Diffstat (limited to 'doc/lua_api.txt')
-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: |