Advertisement
Guest User

Untitled

a guest
May 26th, 2019
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.28 KB | None | 0 0
  1. // in ofApp.h
  2. float angle;
  3. float cameraDistance;
  4. ofCamera camera;
  5.  
  6. // in setup
  7. angle = 0;
  8. cameraDistance = 100;
  9.  
  10. // function
  11. void ofApp::updateCamera() {
  12. camera.setPosition(cameraDistance * sin(angle), cameraDistance * sin(angle), 100);
  13. camera.lookAt(ofVec3f(0, 0, 0));
  14. angle += 0.01;
  15. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement