mirror of
https://github.com/luanti-org/luanti.git
synced 2025-07-02 16:38:41 +00:00
Added get_player_velocity() method. Fixes #1176
This commit is contained in:
parent
7bbb9b066a
commit
5ebb4237e2
3 changed files with 92 additions and 72 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue