Azzera filtri
Azzera filtri

How to change the origin point of a transform Node in 3D World Editor ?

12 visualizzazioni (ultimi 30 giorni)
I have parent-child relationship as follows,
I want to rotate the Arm_0001 node with respect to particular point in the body.
To be able to do this I have created an arbitrary transform node (The node highlighted with blue) as its parent. I need change the origin point of this node to the location I want so that when I give rotation input to the Arm_0001 node, it rotates around where I want.
To be able to explain what I'm trying to achive;
Also as extra: What does center and bboxCenter vectors do in a transform node exactly ?
Thanks in advance.

Risposta accettata

Jan Houska
Jan Houska il 9 Mar 2023
Hi Nuri,
you can use nested Transform nodes. You first create a Transform node that puts your rotating object to the center of rotation, and use the rotation field of this node to rotate your object. Then, you create a nested Transform node that is a child of the previous one, and use the translation field of this child Transform to move your object relative to the center of rotation. Your object will then be a child of this child transform.
Alternatively, you can use just one Transform node to put your object to its position and then use the center field to specify the center of rotation relative to the local coordinate system origin.
Both these usages are nicely described in the X3D standard, which includes an example what the center field exactly does. You can also examine the vrmanipul_global shipping example which appears to be very close to what you are trying to do.
As to the bboxCenter, this specifies the center of the bounding box used to compute collisions. Unless you work with collisions, you don't need to care about bboxCenter.
Good Luck, Jan

Più risposte (0)


Scopri di più su Simulation in Help Center e File Exchange




Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by