1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-08-01 17:38:41 +00:00

Use true pitch/yaw/roll rotations without loss of precision by pgimeno (#8019)

Store the rotation in the node as a 4x4 transformation matrix internally (through IDummyTransformationSceneNode), which allows more manipulations without losing precision or having gimbal lock issues.

Network rotation is still transmitted as Eulers, though, not as matrix. But it will stay this way in 5.0.
This commit is contained in:
Paul Ouellette 2019-02-07 16:26:06 -05:00 committed by Paramat
parent fc566e2e10
commit d5456da69d
8 changed files with 251 additions and 49 deletions

View file

@ -5074,9 +5074,10 @@ This is basically a reference to a C++ `ServerActiveObject`
* `acc` is a vector
* `get_acceleration()`: returns the acceleration, a vector
* `set_rotation(rot)`
* `rot` is a vector (radians)
* `get_rotation()` : returns the rotation, a vector (radians)
* `set_yaw(radians)`
* `rot` is a vector (radians). X is pitch (elevation), Y is yaw (heading)
and Z is roll (bank).
* `get_rotation()`: returns the rotation, a vector (radians)
* `set_yaw(radians)`: sets the yaw (heading).
* `get_yaw()`: returns number in radians
* `set_texture_mod(mod)`
* `get_texture_mod()` returns current texture modifier