ofEasyCam position

How can I get the current position of Easycam camera instance.
Something that would help me print the camera position in real time like ->

ofEasyCam cam;
    ofDrawBitmapString(ofToString(cam.x)  + "  x", 10, 10);
	ofDrawBitmapString(ofToString(cam.y)  + "  y", 10, 15);
	ofDrawBitmapString(ofToString(cam.z)  + "  z", 10, 40); 

thanks !

Hi there!

ofEasyCam is based on ofNode, like every other 3D stuff. On that link you can check all of what offers.

In your case, you can do cam.getGlobalPosition() to return an ofVec3f.
Or cam.getX() / getY() / getZ() to return the respective floats.

1 Like

thanks ! :smiley: