Commit 3cee0d9a authored by Damien Picard's avatar Damien Picard
Browse files

sun_position: fix HDRI mirrorball with rotated env texture

parent 5dd059cd
......@@ -184,7 +184,7 @@ class SUNPOS_OT_ShowHdr(bpy.types.Operator):
# Convert vector to euler
el = asin(dir.z)
az = atan2(dir.x, dir.y)
az = atan2(dir.x, dir.y) + env_tex.texture_mapping.rotation.z
sun_props.hdr_elevation = el
sun_props.hdr_azimuth = az
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment