X,Y,Z values from a vector

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
Wmbest2
Posts: 7
Joined: Thu Aug 19, 2004 10:33 pm
Location: PA, USA
Contact:

X,Y,Z values from a vector

Post by Wmbest2 »

I am relatively new to programming in 3d and would like to output my camera's current position in space so that I can get a handle on 3d space. My question is whether or not it is possible to output the current vector's coordinate to a stringw. I look it doesn't seem that you can access a vector's variables. Thanks.

PS Great Engine Niko!!
JP
Posts: 4526
Joined: Tue Sep 13, 2005 2:56 pm
Location: UK
Contact:

Post by JP »

vector3df pos = camera->getPosition();

pos.X = the x pos, and so on.

Then you can do this:

stringw str;
str += pos.X;
Image Image Image
Wmbest2
Posts: 7
Joined: Thu Aug 19, 2004 10:33 pm
Location: PA, USA
Contact:

Post by Wmbest2 »

Thanks Works Great!!!
Post Reply