How to use a IDummyTransformationSceneNode?

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
oleo
Posts: 27
Joined: Fri Dec 16, 2005 9:50 am

How to use a IDummyTransformationSceneNode?

Post 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)?
sdi2000
Posts: 129
Joined: Thu Aug 25, 2005 12:19 pm
Location: Berlin, DE
Contact:

Post 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
oleo
Posts: 27
Joined: Fri Dec 16, 2005 9:50 am

Post 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.
Post Reply