mirror of
https://github.com/luanti-org/luanti.git
synced 2025-07-22 17:18:39 +00:00
Add Lua methods 'set_rotation()' and 'get_rotation()' (#7395)
* Adds Lua methods 'set_rotation()' and 'get_rotation'. Also changed some method names to be more clear. Instead of an f32 being sent over network for yaw, now a v3f is sent for rotation on xyz axes. Perserved Lua method set_yaw/setyaw so that old mods still work, other wise to set yaw they would need to switch to set_rotation(0, yaw, 0).
This commit is contained in:
parent
9519d57017
commit
faa358e797
18 changed files with 211 additions and 99 deletions
|
@ -40,7 +40,7 @@ std::string gob_cmd_update_position(
|
|||
v3f position,
|
||||
v3f velocity,
|
||||
v3f acceleration,
|
||||
f32 yaw,
|
||||
v3f rotation,
|
||||
bool do_interpolate,
|
||||
bool is_movement_end,
|
||||
f32 update_interval
|
||||
|
@ -54,8 +54,8 @@ std::string gob_cmd_update_position(
|
|||
writeV3F1000(os, velocity);
|
||||
// acceleration
|
||||
writeV3F1000(os, acceleration);
|
||||
// yaw
|
||||
writeF1000(os, yaw);
|
||||
// rotation
|
||||
writeV3F1000(os, rotation);
|
||||
// do_interpolate
|
||||
writeU8(os, do_interpolate);
|
||||
// is_end_position (for interpolation)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue