+ Add setting for dutch angle

If the setting “xcam_dutch_angle” is true, the horizon in a photo is
tilted like before commit 768c8b2caa.
This commit is contained in:
Nils Dagsson Moskopp 2023-11-27 11:58:09 +01:00
parent 389ca7db8d
commit b527871d21
Signed by: erle
GPG Key ID: A3BC671C35191080
2 changed files with 3 additions and 1 deletions

View File

@ -115,8 +115,9 @@ local create_photo_pixels = function( player_name )
local eye = girl:get_pos() + girl:get_eye_offset() / 10
eye.y = eye.y + girl:get_properties().eye_height
local dir = girl:get_look_dir()
local angled = minetest.settings:get_bool( "xcam_dutch_angle", false )
local right = vector.normalize(
vector.new( { x=dir.z, y=0, z=-dir.x } )
vector.new( { x=dir.z, y=angled and dir.y or 0, z=-dir.x } )
)
local down = vector.normalize(
dir:cross( right )

View File

@ -1,3 +1,4 @@
xcam_dutch_angle (Xcam Dutch Angle) bool false
xcam_photo_height (Xcam Photo Height) int 128 16 192
xcam_photo_width (Xcam Photo Width) int 128 16 192
xcam_render_distance (Xcam Render Distance) float 128.0 1.0 256.0