¿Es posible rotar un objeto con TrackballControls?

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

preguntado el 09 de septiembre de 13 a las 22:09

1 Respuestas

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 y position properties of the object, along with the lookAt(THREE.Vector3 point) y similar

Espero que esto ayude.

Respondido el 10 de Septiembre de 13 a las 00:09

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

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

No es la respuesta que estás buscando? Examinar otras preguntas etiquetadas or haz tu propia pregunta.