I'm looking to be able to grab the position of a FPS camera.
Anyone know how?
Position of FPS camera
Position of FPS camera
"The reputation of a thousand years may be determined by the conduct of one hour."
-Japanese Proverb
-Japanese Proverb
Okay, I found it. 
Is there an easier way??
Code: Select all
// create a pointer to a camera
scene::ICameraSceneNode* cameraPtr;
cameraPtr = smgr->getActiveCamera();
// var for camera vector
core::vector3df camera_vector;
// get camera vector
camera_vector = cameraPtr->getAbsolutePosition();
"The reputation of a thousand years may be determined by the conduct of one hour."
-Japanese Proverb
-Japanese Proverb
After you get the camera position, put this code in the while loop, after "driver->endScene()"
Code: Select all
wchar_t tmp[1024];
swprintf(tmp, 1024, L"Camera Position: (%f, %f, %f)", camera_vector.X, camera_vector.Y, camera_vector.Z );
device->setWindowCaption(tmp);"The reputation of a thousand years may be determined by the conduct of one hour."
-Japanese Proverb
-Japanese Proverb