Simple camera (ofEasyCam replacement) for openFrameworks for quickly browsing your scene
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
ofxGrabCam-example Clean up mouse actions a bit Aug 7, 2015
ofxGrabCam-viewportTest cleaned up and working on 0.9.0. need to test with explicit programma… Aug 5, 2015
src fix getting world position (especially when using a manual update wit… Oct 31, 2017
.gitignore cleaned up and working on 0.9.0. need to test with explicit programma… Aug 5, 2015
ofxaddons_thumbnail.png Update Oct 31, 2017


Camera for browsing your 3D world in openFrameworks, which 'picks' the xyz position under the cursor, so all your mouse actions are performed relative to that point in 3D space.

  • Rotations and zoom are then performed with respect to that xyz position.
  • Rotations are performed using a trackball model.

Inspired by Google SketchUp (

Elliot Woods


//in your app .h
ofxGrabCam camera
//in your .cpp

void ofApp::draw() {
    //do your 3d drawing


ofxGrabCam (general)

Left click drag = rotate

Right click drag = zoom

hold 'h' whilst left click drag = pan

'r' key = reset

Example project

'c' = toggle draw cursor

'u' = toggle fix up vector


MIT License


  • We use glReadPixels to read back the depth buffer around the mouse cursor to find the XYZ position
  • Reading back the depth buffer happens only when required (e.g. mouse down/dragged, or when you enable the 3D cursor)
  • Reading back all the time may reduce your frame rate, so make sure to leave the cursor disabled (default) if you want a higher frame rate.


"this is basically the best thing ever." - kyle mcdonald

"this is absolute crap" - golan levin