Is it possible to rotate an object with TrackballControls?

960 views Asked by At

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

1

There are 1 answers

2
Dragan Okanovic On

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.