1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-08-11 17:51:04 +00:00

ObjectRef: Add add_velocity() (#3208)

Allow changing the velocity of objects relatively to their current velocity
This commit is contained in:
you 2018-03-31 14:48:38 +02:00 committed by SmallJoker
parent 0a8ca59891
commit 93eb0794d6
5 changed files with 27 additions and 1 deletions

View file

@ -4029,6 +4029,10 @@ This is basically a reference to a C++ `ServerActiveObject`
##### LuaEntitySAO-only (no-op for other objects)
* `set_velocity(vel)`
* `vel` is a vector, e.g. `{x=0.0, y=2.3, z=1.0}`
* `add_velocity(vel)`
* `vel` is a vector, e.g. `{x=0.0, y=2.3, z=1.0}`
* In comparison to using get_velocity, adding the velocity and then using
set_velocity, add_velocity is supposed to avoid synchronization problems.
* `get_velocity()`: returns the velocity, a vector
* `set_acceleration(acc)`
* `acc` is a vector