minetest icon indicating copy to clipboard operation
minetest copied to clipboard

Reverse eye-offset Z-coordinate in 3rd person front view

Open lhofhansl opened this issue 3 years ago • 1 comments

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.

lhofhansl avatar Mar 28 '23 17:03 lhofhansl

This might be a good one for 5.7. @sfan5

lhofhansl avatar Apr 03 '23 21:04 lhofhansl

I feel like this should be an easy one. Anything I need to do?

lhofhansl avatar Jul 01 '23 16:07 lhofhansl

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

srifqi avatar Jul 03 '23 03:07 srifqi

... 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.

grorp avatar Jul 03 '23 12:07 grorp

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.

srifqi avatar Jul 04 '23 12:07 srifqi

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.

grorp avatar Jul 04 '23 14:07 grorp