Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // in ofApp.h
- float angle;
- float cameraDistance;
- ofCamera camera;
- // in setup
- angle = 0;
- cameraDistance = 100;
- // function
- void ofApp::updateCamera() {
- camera.setPosition(cameraDistance * sin(angle), cameraDistance * sin(angle), 100);
- camera.lookAt(ofVec3f(0, 0, 0));
- angle += 0.01;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement