1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-08-16 18:01:40 +00:00

Add object's own position for each collision to moveresult (#14608)

This commit is contained in:
grorp 2024-05-05 13:28:59 +02:00 committed by GitHub
parent d7f9da49eb
commit af8cb63292
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 18 additions and 6 deletions

View file

@ -5124,6 +5124,9 @@ Collision info passed to `on_step` (`moveresult` argument):
axis = string, -- "x", "y" or "z"
node_pos = vector, -- if type is "node"
object = ObjectRef, -- if type is "object"
-- The position of the entity when the collision occurred.
-- Available since feature "moveresult_new_pos".
new_pos = vector,
old_velocity = vector,
new_velocity = vector,
},
@ -5437,6 +5440,8 @@ Utilities
-- Allow passing an optional "actor" ObjectRef to the following functions:
-- minetest.place_node, minetest.dig_node, minetest.punch_node (5.9.0)
node_interaction_actor = true,
-- "new_pos" field in entity moveresult (5.9.0)
moveresult_new_pos = true,
}
```