Change orbit control rotation axis with respect to Z axis upward

I have created a grid as a base ground for my scene. I am rotating the grid axis as following to have perspective of x and y on horizontal plain and z in upward and downward direction.

var gridGround = new THREE.GridHelper(1000, 30,0x3f3f3f, 0x3f3f3f);
gridGround.rotation.x = Math.PI/2;

I am using perspective camera along with orbitcontrol for allowing user to navigate in scene. However i am not able to change the rotation axis wrt change in perspective i have made above. I have tried using camera.up.set(0,0,1); but its not working.

Any help would be great.

You mean a setup like this? https://jsfiddle.net/3p6e8xdL/2/

Can you please elaborate in more detail what you want to achieve? The orbit axis is derived from camera.up. When setting it to (0,0,1), the controls seems to behave as expected.

1 Like

Hello I have also an issue, very similar I think:
In the fiddle, with camera up 0,0,1, press right click and try to move the camera up/down. That will move over x/y plane instead of z (z is my vertical axis). But left/right span and rotate are working fine.

If i set camera.up to 1,0,0 it’s almost ok for the vertical span, but the mouse is inverted (moving mouse up will lower the camera).
Also the rotation is not so good with 1,0,0. What I would like to get, is a camera that acts exactly like in three.js editor.

Can somebody help me with that?