Skip to content
This repository was archived by the owner on May 9, 2025. It is now read-only.

Commit 00c06e4

Browse files
author
Sebastian Sille
committed
Export_3ds: Advanced target calculation
Some finetuning in z-axis calculation Rounded up the diagonal to avoid too large tilt angles
1 parent 20171ed commit 00c06e4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

io_scene_3ds/export_3ds.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1050,7 +1050,7 @@ def calc_target(posi, tilt=0.0, pan=0.0):
10501050
adjacent = math.radians(90)
10511051
turn = 0.0 if abs(pan) < adjacent else -0.0
10521052
lean = 0.0 if abs(tilt) > adjacent else -0.0
1053-
diagonal = math.copysign(math.sqrt(pow(posi.x ,2) + pow(posi.y ,2)), posi.y)
1053+
diagonal = math.ceil(math.sqrt(pow(posi.x ,2) + pow(posi.y ,2)))
10541054
target_x = math.copysign(posi.x + (posi.y * math.tan(pan)), pan)
10551055
target_y = math.copysign(posi.y + (posi.x * math.tan(adjacent - pan)), turn)
10561056
target_z = math.copysign(diagonal * math.tan(adjacent - tilt), lean)

0 commit comments

Comments
 (0)