Reverse eye-offset Z-coordinate in 3rd person front view
Add compact, short information about your PR for easier understanding:
Fixes #11965
To do
This PR is Ready for Review.
How to test
player:set_eye_offset({x=0, y=0, z=0}, {x=0, y=0, z=-5})
Then switch between 3d person and 3rd person front views. Note how the z-coordinate is correctly reversed.
This might be a good one for 5.7. @sfan5
I feel like this should be an easy one. Anything I need to do?
The implementation itself looks good (as it is also trivial), but I still have some things about the concept here: https://github.com/minetest/minetest/issues/11965#issuecomment-1569297001
... or should we have a third argument for front-view, i.e. set_eye_offset([firstperson, thirdperson, thirdpersonfront])? It can be optional and defaults to negative of the offset. This will allow mods to specify the relative camera position in case of long model or offsetted model like a dragon/snake/bus/train.
Originally posted by @srifqi in https://github.com/minetest/minetest/issues/11965#issuecomment-1569297001
Allowing modders to specify a separate eye offset value for CAMERA_MODE_THIRD_FRONT sounds like a good idea. However, this PR is already a big improvement and fixes an existing problem. I think this should be merged as is, and your idea can still be implemented afterwards.
However, this PR is already a big improvement and fixes an existing problem. I think this should be merged as is, ....
Is the new behaviour from this PR fine for modders? I do not use this feature much, so I can not give any modder perspective on it.
Is the new behaviour from this PR fine for modders? I do not use this feature much, so I can not give any modder perspective on it.
I don't see how the old behavior could have been useful for modders, but of course I can't speak for everyone. At least, a modder has opened an issue describing the old behavior as a bug.