How to change the origin point of a transform Node in 3D World Editor ?
6 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Nuri Efe TATLI
el 8 de Mzo. de 2023
Respondida: Jan Houska
el 9 de Mzo. de 2023
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.
0 comentarios
Respuesta aceptada
Jan Houska
el 9 de Mzo. de 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
0 comentarios
Más respuestas (0)
Ver también
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!