Translation and rotation question.

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
r2d2
Posts: 211
Joined: Mon Nov 24, 2003 5:22 pm

Translation and rotation question.

Post by r2d2 »

Let's say we have a scenenode that is just at the position 0,0,0 which has no mesh so you won't see anything. You add an animatedmeshscenenode at the same spot as child of it. Now you apply a rotation matrix to the first. Now both object (well you can't see the first one because it hase no mesh attached to it) should rotate and if we would add two times the same mesh ad the same spot the two should rotated synchroned. But the second mesh or the child mesh(depends on which of the two examples you use) doesn't rotate it just translates up and down left and right with the other object but it just doesn't rotate it just rotates if i set the absolute transformation matrix manually but then everything is messed up again when the nodes are not on the same spot and with the relative transformation matrix nothing is working.
I don't think that this can be right. If someone want's to i can send him/her the code.
R2D2's Irrlicht Mods
Messed up with my database so the page is not working at the moment -.-
CPU: Core 2 Quad Q6700RAM: 4096 mb Graphics: Radeon 4850 512mb Sound: on board InternetConnection: DSL
warui
Posts: 232
Joined: Wed Apr 14, 2004 12:06 pm
Location: Lodz, Poland
Contact:

Post by warui »

Strange, i did that for camera (camera where child of a empty node) and everything worked ok. What node did you used ? I used scene::ISceneManager::addEmptySceneNode().
Tomasz Nowakowski
Openoko - www.openoko.pl
r2d2
Posts: 211
Joined: Mon Nov 24, 2003 5:22 pm

Post by r2d2 »

it's the same i use
R2D2's Irrlicht Mods
Messed up with my database so the page is not working at the moment -.-
CPU: Core 2 Quad Q6700RAM: 4096 mb Graphics: Radeon 4850 512mb Sound: on board InternetConnection: DSL
warui
Posts: 232
Joined: Wed Apr 14, 2004 12:06 pm
Location: Lodz, Poland
Contact:

Post by warui »

Now i see it. You used rotation matrix while i use setRotation() method. Maybe that make diference ?
Tomasz Nowakowski
Openoko - www.openoko.pl
arras
Posts: 1622
Joined: Mon Apr 05, 2004 8:35 am
Location: Slovakia
Contact:

Post by arras »

That is the think, he is using matrix to directly transform model as I understand it. I also use empty scenenode as parent to camera and my code work with matrices but for filal position and rotation changes I use setRoration and setPosition functions.
r2d2
Posts: 211
Joined: Mon Nov 24, 2003 5:22 pm

Post by r2d2 »

hmm that could be the problem i will have a look at it perhaps that's the failure
R2D2's Irrlicht Mods
Messed up with my database so the page is not working at the moment -.-
CPU: Core 2 Quad Q6700RAM: 4096 mb Graphics: Radeon 4850 512mb Sound: on board InternetConnection: DSL
Post Reply