get camera x,y,z..

You are an experienced programmer and have a problem with the engine, shaders, or advanced effects? Here you'll get answers.
No questions about C++ programming or topics which are answered in the tutorials!
Post Reply
Spartacus
Posts: 70
Joined: Fri Nov 21, 2003 11:56 pm

get camera x,y,z..

Post by Spartacus »

How do I get the cameras xyz so i can use swprintf to print the x,y, and z coordinate to a status box or somthing? I tried looking at docs i cant find any way?
[dx/x]=HUNT3R
Posts: 271
Joined: Sat Aug 23, 2003 5:52 pm
Location: Hurricane Central, Florida

Post by [dx/x]=HUNT3R »

same way you get any node's coordinates

Code: Select all

core::vector3df someVector = camera->getPosition();
Spartacus
Posts: 70
Joined: Fri Nov 21, 2003 11:56 pm

Post by Spartacus »

Yes I tried that already probelm was i didnt unerstand how i can get each xyz?
gastar
Posts: 9
Joined: Wed Sep 24, 2003 7:52 am

Post by gastar »

Hi,

someVector.X
someVector.Y
someVector.Z
DevSpartacus

Post by DevSpartacus »

What will X Y and Z return float double integer? i saw that in docs but it said T ? as in template i guess but i dont know how id use that? with the swprintf
madinitaly
Posts: 92
Joined: Sat Nov 29, 2003 8:30 pm
Contact:

Post by madinitaly »

Shoud be:

Code: Select all

wchar tmp[1024];
swprintf (tmp, L"X: %f, Y: %f, Z: %f", someVector.X, someVector.Y, someVector.Z);
Guest

Post by Guest »

I currently have this:

wchar_t tmp[1024];
camera_pos=camera->getPosition();
swprintf(tmp, 1024, L"X: %f Y: %f Z: %f",camera_pos.X,camera_pos.Y,camera_pos.Z);
statusText->setText(tmp);

And X,Y,and Z area always 0?
[dx/x]=HUNT3R
Posts: 271
Joined: Sat Aug 23, 2003 5:52 pm
Location: Hurricane Central, Florida

Post by [dx/x]=HUNT3R »

are you using the FPS camera, b/c if you are the same thing happens to me everytime too. The getPosition, get AbsolutePosition and setPosition methods do not work with the FPS camera... :evil:
Spartacus
Posts: 70
Joined: Fri Nov 21, 2003 11:56 pm

Post by Spartacus »

I got it so im not anymore I think, However now i cant move 0.o AT ALL!
Post Reply