1

Is it possible to rotate an object – instead of the camera – with TrackballControls? http://threejs.org/examples/js/controls/TrackballControls.js

imbrizi
  • 3,788
  • 1
  • 25
  • 26

1 Answers1

0

Three.js introduced the Controls so you could easily maneuver with the camera around in the space. Controls are used for camera, like TrackballControls, FPSControls... They make moving with camera and pivoting a lot easier and they are almost automatically updated, so no need for hand-coded calculations.

If you wish to transform the object, then you should use rotation and position properties of the object, along with the lookAt(THREE.Vector3 point) and similar.

Hope this helps.

Dragan Okanovic
  • 7,509
  • 3
  • 32
  • 48
  • I have the impression a lot of the code TrackballControls is not specific to the camera. It might be (almost) ready to rotate objects as well, I just couldn't find much info about it. For now, I am updating rotation and position manually, as you said. – imbrizi Sep 10 '13 at 21:59
  • 1
    But, as I tried to say, trackball controls shouldn't be used for manipulating object, even if they somehow can do that. Controls are used for camera, and objects' transformations properties are used for, well, transformations. – Dragan Okanovic Sep 11 '13 at 07:46