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:
parent
0a8ca59891
commit
93eb0794d6
5 changed files with 27 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue