Add interpolation toggle to set_rotation - #17299
Conversation
There was a problem hiding this comment.
Thanks for taking a stab!
Regarding the implementation details: I don't think this should be a property. Properties are for "persistent"-ish values, this is a very temporary value, usually tied to a specific set_rotation() call. (Furthermore, rotation is not part of the object properties; it would be a bit odd if a property relating specifically to rotation were.)
Thus I would prefer a parameter on set_rotation(), ending up in the same AO CMD as the rotation (AO_CMD_UPDATE_POSITION, somewhat misnamed).
For a first implementation, players can be ignored; calling set_rotation() on players probably should warn anyways, it doesn't do anything reasonable because it's instantly overwritten by client-provided yaw.
Issue this PR addresses: #16745
1753744 to
9a02291
Compare
|
hey thanks for the review, agreed, that makes a lot more sense! I've moved it from the entity level now to set_rotation instead. Updated respective minetest_game PR as well to pass in the bool on set_rotation. |
9a02291 to
6f375d7
Compare
Fixes: #16745
Related: luanti-org/minetest_game#3255
Add compact, short information about your PR for easier understanding:
Adds optional interpolate parameter to set_rotation(rotation, interpolate). When false, rotation snaps instantly on the client instead of blending over ~100ms. Default true preserves existing behavior.
Needed to fix minetest_game#2950 and #2948 as the cart mod needs precise rotation timing that the engine's built-in interpolation prevents.
Kiro was used to assist with code writing of the laid out tasks plan, after investigating.
To do
This PR is a Ready for Review.
How to test