Three.js: OrbitControl not working when camera position at 0,0,0

Created on 11 Jan 2017  路  2Comments  路  Source: mrdoob/three.js

Description of the problem

When I try to use OrbitControl just like in the examples provided, it only seems to work when i set camera.position to something other than 0,0,0. No events are being triggered but when I add camera.position.set(0, 0, 10); to my code then it suddenly starts to work.

Three.js version
  • [x] r83
Browser
  • [x] All of them
  • [ ] Chrome
  • [ ] Firefox
  • [ ] Internet Explorer
OS
  • [ ] All of them
  • [x] Windows
  • [x] Linux
  • [x] Mac
  • [ ] IOS
Hardware Requirements (graphics card, VR Device, ...)

Most helpful comment

You cannot set controls.target and camera.position to the same value.

All 2 comments

You cannot set controls.target and camera.position to the same value.

Yep, check out this example as an orientation.

https://jsfiddle.net/c26wef25/4/

Was this page helpful?
0 / 5 - 0 ratings