How to use the rotateCamera function of Trackball Controls in ThreeJS?

282 Views Asked by At

I am looking for autorotate functionality like in Orbital controls. I found the rotateCamera() in Threejs Docs. Not sure how to use it or call it. Can anyone tell me how to use it?

1

There are 1 best solutions below

0
Mugen87 On

TrackballControls does not support auto rotate. The mentioned method rotateCamera() is intended for internal use only. It's actually called by update().

You have two options now:

  • Use OrbitControls
  • Create a custom version of TrackballControls and implement the auto rotate feature by yourself.