Skip to content

Instantly share code, notes, and snippets.

@graphoarty
Created February 21, 2019 19:23
Show Gist options
  • Save graphoarty/194ec50a0f216fa9dc3f5f79f545f42a to your computer and use it in GitHub Desktop.
Save graphoarty/194ec50a0f216fa9dc3f5f79f545f42a to your computer and use it in GitHub Desktop.
// Initialize OrbitControls on to the camera
// use the domElement from the renderer to catch the events from mouse and keyboard
var controls = new THREE.OrbitControls(camera, renderer.domElement);
// The behaviour we are looking for here is purely rotational
controls.target.set(camera.position.x + .1, camera.position.y, camera.position.z);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment