How do you move a TransformNode?

My problem goes like this, I have a TransformNode that creates at coordinates 0,0,0 but my models are created in a programmatic way, so I will use the transformNode to group them and rotate them in their own center… the problem is that I want to move the TransformNode to the center of the mesh and then parent it with the mesh, is that possible?

I don’t think I need a PG for this one, my post is kind of self explanatory.

and just for context, I need to create it like that because my project consist on creating one box in top of another and every box is an independent mesh so I need to parent them and then use the node to set a center for the figures to rotate.

Hey, not 100% sure if I am understanding the question, but I’ll give it a go.

If you want the transform node to be at the center of the mesh, you just need to set the mesh’s position to 0,0,0 and then move the transform node wherever you want it to be in the scene.

You can also call setPivotPoint to determine the point that rotations are executed around.

Here is a super simple PG demonstrating these concepts.

Please let me know if that doesn’t answer your question!

3 Likes

Thanks!! I tried moving the position of the figure but with no avail, this was the thing I was needing!

1 Like