Attaching a node to the camera position?

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
Dirtbiker
Posts: 29
Joined: Wed Aug 31, 2005 7:02 am
Location: U.S.
Contact:

Attaching a node to the camera position?

Post 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?
cederron
Posts: 53
Joined: Thu Jul 13, 2006 11:35 pm

Post 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.
Dirtbiker
Posts: 29
Joined: Wed Aug 31, 2005 7:02 am
Location: U.S.
Contact:

Post by Dirtbiker »

Tried that, did'nt work. It accutally froze my rotation animator.
Acki
Posts: 3496
Joined: Tue Jun 29, 2004 12:04 am
Location: Nobody's Place (Venlo NL)
Contact:

Post by Acki »

I did not try this, but did you try to call updateAbsolutePosition() for the camera, before geting his position ???
while(!asleep) sheep++;
IrrExtensions:Image
http://abusoft.g0dsoft.com
try Stendhal a MORPG written in Java
Pazystamo
Posts: 115
Joined: Sat Dec 03, 2005 5:56 pm
Location: Lithuania
Contact:

Post 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.
My project in forum- ATMOsphere - new dynamic sky dome for Irrlicht
juliusctw
Posts: 392
Joined: Fri Apr 21, 2006 6:56 am
Contact:

check out my source code

Post 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
adam23
Posts: 14
Joined: Fri Jun 16, 2006 6:37 pm
Contact:

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