Page 1 of 1

How to use a IDummyTransformationSceneNode?

Posted: Wed Mar 08, 2006 4:24 pm
by oleo
Hi,
after reading this post, I understand that to manage rotation of 2 scenenode (parent and child) I need a dummyscenenode, but I can't clearly understand how to do it...

For example I have 2 indipendent TestSceneNode that can be moved and rotated indipendently, then I would like to attach one to the other with a parent-child relationship and move and rotate them linked together.

Can anyone show me how to do this, posting an example about 2 scenenode (parent and child)?

Posted: Wed Mar 08, 2006 8:09 pm
by sdi2000
hey,
take a piece of paper and a pen and paint your intention.
and dont forget to use your brain...

**** ****
one| |two
\____/
parent

a child have only one parent, but .... bla bla bla....
like in the real live... maybe not always :D

Posted: Wed Mar 08, 2006 10:08 pm
by oleo
I probably didn't explain correctly the kind of my problem... :cry:
Imagine to have 2 cubes (TestSceneNodes) created in (0,0,100) and (0,0,110) and then try to attach the second cube to the first doing something like this:

Code: Select all

second->setParent(first)
You will notice that the second cube moves to (0,0,210). I don't want this to happen when I link 2 nodes! I want the child preserves the absolute position and rotation!
How to do it?

Now I've solved the position matter moving the second cube to the original position but I'm not able to solve the rotation matter!

Thanks for any help!
Fabio.