Page 1 of 1

Attaching a node to the camera position?

Posted: Fri Jul 14, 2006 12:33 am
by Dirtbiker
I need to attach a node to the camera position and keep the rotation static.
I set the node as a child and it follows the camera position and rotation. I tried setting the node to the position of the camera and the node has the slightest lag.
How could I set the position without setting the rotation and causing lag?

Posted: Fri Jul 14, 2006 12:50 am
by cederron
Try to make the node a child of the cam and then when camera rotates reset the node rotation so it's always fixed. Just an idea, I'm quite new to irrlicht. Hope this helps.

Posted: Fri Jul 14, 2006 8:09 am
by Dirtbiker
Tried that, did'nt work. It accutally froze my rotation animator.

Posted: Fri Jul 14, 2006 12:55 pm
by Acki
I did not try this, but did you try to call updateAbsolutePosition() for the camera, before geting his position ???

Posted: Fri Jul 14, 2006 9:08 pm
by Pazystamo
You can do this without adding child. In my atmosphere project i used camera position to set sun position. look to void prep_interpolation in atmosphere.cpp on 372 line.

check out my source code

Posted: Mon Jul 17, 2006 5:53 am
by juliusctw
i have a working 3rd person camera example in my site, you can read it , or just use that camera


freewebs.com/juliusctw

Posted: Tue Jul 18, 2006 4:00 pm
by adam23
That is a really good camera, if I could only figure out how to get it to move the way I would like.