bboy
bboy

Reputation: 1408

threeJS reinit controls and keep camera position

using threeJS to create a sphere with a 360 image. init with:

this.controls = new THREE.DeviceOrientationControls(this.camera, true);

and on click I change controls to OrbitControls.

Is there a way to keep/find current camera position?

Upvotes: 0

Views: 157

Answers (1)

bboy
bboy

Reputation: 1408

results achieved by combining DeviceOrientationControls and OrbitControls, together with controls enable/disable toggle, below.

this.controls.enabled = !this.controls.enabled;

Upvotes: 0

Related Questions