From 81377015ef66538b7654740a1edd9e0f0b3204e2 Mon Sep 17 00:00:00 2001 From: Lila Date: Thu, 22 Aug 2024 08:52:55 +0100 Subject: [PATCH] [SM64] Fix #352 regression (#425) It is not enough to rely on an object's location and rotation as we need a relative position --- fast64_internal/utility.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/fast64_internal/utility.py b/fast64_internal/utility.py index d59c59276..887df9a57 100644 --- a/fast64_internal/utility.py +++ b/fast64_internal/utility.py @@ -788,7 +788,8 @@ def store_original_mtx(): for obj in yield_children(active_obj): # negative scales produce a rotation, we need to remove that since # scales will be applied to the transform for each object - obj["original_mtx"] = Matrix.LocRotScale(obj.location, obj.rotation_euler, None) + loc, rot, _scale = obj.matrix_local.decompose() + obj["original_mtx"] = Matrix.LocRotScale(loc, rot, None) def rotate_bounds(bounds, mtx: mathutils.Matrix):