1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-09-05 18:41:05 +00:00

Document & extend testing for rotation conventions (#16200)

* Document Luanti rotation conventions
* Add test for setPitchYawRollRad (entity) rotation conventions
* Test and document that `vector.rotate` uses (extrinsic) Z-X-Y rotation order
This commit is contained in:
Lars Müller 2025-07-13 17:11:12 +02:00 committed by GitHub
parent 33940021a1
commit 23bf50a07c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 123 additions and 38 deletions

View file

@ -1158,6 +1158,8 @@ int ObjectRef::l_set_rotation(lua_State *L)
v3f rotation = check_v3f(L, 2) * core::RADTODEG;
// Note: These angles are inverted before being applied using setPitchYawRoll,
// hence we end up with a right-handed rotation
entitysao->setRotation(rotation);
return 0;
}