From 5ebb4237e204bfa760313f6f2a46a09dceb9cce0 Mon Sep 17 00:00:00 2001 From: Elia Argentieri Date: Thu, 25 Jun 2015 14:57:10 +0200 Subject: Added get_player_velocity() method. Fixes #1176 --- doc/lua_api.txt | 1 + 1 file changed, 1 insertion(+) (limited to 'doc') diff --git a/doc/lua_api.txt b/doc/lua_api.txt index 34d22cdb8..e156d75e4 100644 --- a/doc/lua_api.txt +++ b/doc/lua_api.txt @@ -2470,6 +2470,7 @@ This is basically a reference to a C++ `ServerActiveObject` ##### Player-only (no-op for other objects) * `get_player_name()`: returns `""` if is not a player +* `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) -- cgit v1.2.3