Amerio.Stephane Posted December 17, 2025 Posted December 17, 2025 Hello, Not sure if this is a bug, or a misunderstanding, or a lack of documentation, so let's see. I have a Node on disk ("instance.node"), and the root node of its content has a rotation applied: *instance.node **group <- root node, with a rotation ***object <- some actual meshes When the instance.node is instanciated in the code with ig->loadNode("path/to/instance.node"), the node reference is extracted and the hierarchy is just group/object (there is no instance.node in the debug hierrachy view) The problem is the "group" transform is reset, so any saved rotation placed in the reference is lost. Of course, this happens because the node has been extracted and no additional root node has been added, so the top node transform is simply cleared. But shouldn't the loadNode add a new root to account for this? As I understood, c++ project should not by default extract reference, so is this a bug/regression or am I misunderstanding something here? Note: the workaround is easy, as I simply have to add another layer (group/subgroup <- move the rotation to the subgroup), but I'd like to know exactly what is going on here.
cash-metall Posted December 18, 2025 Posted December 18, 2025 Yes, we are aware of this issue. Its alreay fixed and will be available in 2.21. This happens because it always call LoadNode with third argument with the identity matrix in initial transform. https://developer.unigine.com/en/docs/latest/api/library/plugins/syncker/class.syncker_master?highlighted=loadnode%2Cloadnodelll%2Cloadnod%2Cloadnodell&subnavView=brief&subnavSort=none#loadNode_cstr_uchar_Mat4_Node Indeed, this can be workarounded by adding a root node without transformation
Recommended Posts