While using Orbit control with following controls , The 360 rotation is working on it single point as per my need. But It is looking a position as default. I need to change it to some other side. How to do that .
var controls = new OrbitControls( camera, renderer.domElement ); controls.enableZoom = false; controls.enablePan = false; controls.enableDamping = true; controls.rotateSpeed = - 0.25;
You have to change the default value of OrbitControls.target.
If I change the target, then the orbit control 360 rotation axis also will be changed to the new target . But I need to rotate the based on the same axis as of now, but the camera needs to see some other point. @Mugen87
Sorry, but this is not supported by the controls.
Please have a look into this .
In this , the default view is as follow
But I need to set it as below.
How to do this
@jaya_kannan
Then you can do something like that for your camera’s start position:
let spherical = new THREE.Spherical(distance_from_center, Math.PI, 0);
spherical.makeSafe(); // see in the docs what it does
camera.position.setFromSpherical(spherical);
1 Like
Thank you for your kind reply @prisoner849. Can you please say what is that distance_from_center
?
How far you want your camera to locate from the center of the scene.