src/scene.c

changeset 133
823626940dc9
parent 130
c3fce2a543ee
child 136
768e6eac1ab0
--- a/src/scene.c	Sun Jun 01 14:28:00 2025 +0200
+++ b/src/scene.c	Sun Jun 01 14:28:30 2025 +0200
@@ -122,13 +122,17 @@
         if (asc_test_flag(node->flags, ASC_SCENE_NODE_UPDATE_TRANSFORM)) {
             asc_set_flag(node->flags, ASC_SCENE_NODE_TRANSFORM_UPDATED);
             asc_clear_flag(node->flags, ASC_SCENE_NODE_UPDATE_TRANSFORM);
-            // TODO: FIXME: this makes it impossible to directly modify the transform with matrix operations!
-            asc_transform_from_vec3f(
-                    node->transform,
-                    node->position,
-                    node->scale,
-                    node->rotation
-            );
+
+            // Only recalculate from components if not using custom transform
+            if (!asc_test_flag(node->flags, ASC_SCENE_NODE_CUSTOM_TRANSFORM)) {
+                asc_transform_from_vec3f(
+                        node->transform,
+                        node->position,
+                        node->scale,
+                        node->rotation
+                );
+            }
+
             asc_mat4f_mulst(
                     node->world_transform,
                     node->transform,

mercurial