Trying to get a text scene node to move with camera

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
TCNJ
Posts: 9
Joined: Sun Mar 30, 2008 3:27 pm

Trying to get a text scene node to move with camera

Post by TCNJ »

As is apparent from the subject I'm trying to get a text scene node to move with the camera in my program so that it can always be visible. I am using irredit and have managed to position the text node so that it is visible when the camera spawns. However when I add the scene node as a child of the camera the text disappears. I am relatively new to this program and c++ in general so I may be missing something obvious.

Thanks for any help,

Michael Dillon
MasterGod
Posts: 2061
Joined: Fri May 25, 2007 8:06 pm
Location: Israel
Contact:

Post by MasterGod »

When you add it as child the position is relative to the camera so try position it like 0,0,10 so it will be 10 units (on Z axis) == in front of the camera.
Image
Dev State: Abandoned (For now..)
Requirements Analysis Doc: ~87%
UML: ~0.5%
JP
Posts: 4526
Joined: Tue Sep 13, 2005 2:56 pm
Location: UK
Contact:

Post by JP »

Yeah, getting a good offset (position relative to the camera) for a child can be tricky but you've just got to do some trial and error. As MasterGod says setting the position of the text to 0,0,10 will place the text 10 units down the camera's z axis and it will remain there when the camera rotates and moves so it will always be 10 units down the camera's z axis, i guess that should make it visible all the time but you've just got to try some different values for the offset until you see it on the screen properly.
Image Image Image
TCNJ
Posts: 9
Joined: Sun Mar 30, 2008 3:27 pm

Post by TCNJ »

Thank you very much.

Michael
Post Reply