I added
std::string coord = camera->getPosition();
std::cout << coord << std::endl;
so that I can see the coordinates where the camera is that thus I can use the numbers I get and set it as the starting point whenever the game loads.
But there is an error because getPostion cannot be converted into a String. Any ideas how to solve that or is there a better way to determine what coordinates I need to set in camera->setPosition(core::vector3df(-100,50,-150));
thanks.
how to I get to see the coordinates of the camera? [solved]
how to I get to see the coordinates of the camera? [solved]
Last edited by ~ Dream on Wed Jul 04, 2007 5:45 am, edited 1 time in total.
~ Dream
you need to convert the variables into a stringw to be able to display them.
for example if i wanted to display the coordinates in the static text box
vector3df pos = camera->getPosition();
stringw testString = stringw("Position X:") + stringw(pos.X)+stringw("Position Y:") + stringw(pos.Y)+stringw("Position Z:") + stringw(pos.Z);
then set that to be the static text scene nodes value.
Hope that helps
Cheers
Courtney
for example if i wanted to display the coordinates in the static text box
vector3df pos = camera->getPosition();
stringw testString = stringw("Position X:") + stringw(pos.X)+stringw("Position Y:") + stringw(pos.Y)+stringw("Position Z:") + stringw(pos.Z);
then set that to be the static text scene nodes value.
Hope that helps
Cheers
Courtney