Friday, 14 September 2018

Not able to rotate or pan my panorama in three js

I am not using the default code to do camera rotation in three js which is

lat = Math.max( - 85, Math.min( 85, lat ) );
phi = THREE.Math.degToRad( 90 - lat );
theta = THREE.Math.degToRad( lon );
camera.target.x = 100 * Math.sin( phi ) * Math.cos( theta );
camera.target.y = 100 * Math.cos( phi );
camera.target.z = 100 * Math.sin( phi ) * Math.sin( theta );

Instead I am doing lookVector.applyAxisAngle(axis, 0.001); and so I think I am not able to pan the 360 image with mouse. I have put my code in fiddle https://jsfiddle.net/sh60yqfx/32/ Please help.. thanks



from Not able to rotate or pan my panorama in three js

No comments:

Post a Comment