diff --git a/io_scene_3ds/import_3ds.py b/io_scene_3ds/import_3ds.py index 459c743d0..e61227947 100644 --- a/io_scene_3ds/import_3ds.py +++ b/io_scene_3ds/import_3ds.py @@ -577,6 +577,9 @@ def process_next_chunk(context, file, previous_chunk, imported_objects, CONSTRAI else: tilt = -1 * (math.copysign(pitch, pos[0])) pan = -1 * (math.radians(90) - math.atan(pos[1] / foc)) + if abs(location[1]) < abs(target[1]): + tilt = -1 * tilt + pan = -1 * pan elif abs(location[1] - target[1]) > abs(location[0] - target[0]): foc = math.copysign(math.sqrt(pow(pos[1],2) + pow(pos[0],2)), pos[1]) dia = math.copysign(math.sqrt(pow(foc,2) + pow(target[2],2)), pos[1]) @@ -587,6 +590,9 @@ def process_next_chunk(context, file, previous_chunk, imported_objects, CONSTRAI else: tilt = -1 * (math.copysign(pitch, pos[1])) pan = -1 * (math.radians(90) - math.acos(pos[0] / foc)) + if abs(location[0]) < abs(target[0]): + tilt = -1 * tilt + pan = -1 * pan direction = tilt, pan return direction