ArcRotateCamera change axis of rotation

I am working with Autosar Coordinates and would like to avoid having to transform everything. So with a a bit of rotating stuff around and setting useRightHandedSystem for the scene everything is fine.

What I haven’t figured out yet, is how to handle the ArcRotateCamera. By default it rotates (alpha and beta) around the y-axis. But I would need it to rotate around the z-axis now. Couldn’t find how to do this :frowning:

I prepared a playground to showcase. I would like to rotate around the z-axis (blue arrow) instead of the y-axis (green arrow).
https://playground.babylonjs.com/#CF8SFP#3

Hi @jodo and welcome back. This is a totally wild suggestion that could throw all your axes off kilter and I do not know whether it will do anything at all. I am just on a mobile currently so can’t try it out. Might be worth a play with.

Set camera upVector to z axis

https://doc.babylonjs.com/api/classes/babylon.arcrotatecamera#upvector

Hero! Thanks a lot.
camera.upVector = new BABYLON.Vector3(0, 0, 1);
did the trick

1 Like