Offset OrbitControls pivot point

Hey, I need to offset my “scene center” and want to orbit around a offseted pivot point.
My canvas is filling the whole browser window and I have a sidemenu on the right which takes ca 25 percent of the window width. I want my obj to be in the center of the remaining 75% and also orbit around that point (the red dot). I dont want to just put my obj in a empty obj and offset the position, because it wouldnt orbit around the objs center anymore.

I need this for perspective and orthographic camera. Is there a way to do so?


1 Like

Are you aware that you can configure the focus points of OrbitControls by modifying its target property?

Yes, but therefore I would need to offset my objs as well. The only way I can imagine solving this, is by rendering a higher screen size and then cut out the part to be shown on screen. I think this is possible with the camera.setViewOffset(…) function, but this means much higher performance. Im using SAO, SSAARenderPass and gammaCorrection etc. Its already getting slow on big screens.

I hoped there might be a easier way I dont see.

I don’t understand this. Can you please explain in more detail? You can freely configure the target vector.

If I set my target, I set a vector3 as position for the pivot point right? So I need to set the obj position to the same point, so that orbitcontrols will orbit around my obj.
But I need my objs to be in the center of the scene and want only the viewport to be offsetted to the right. Do you understand the image above? The offset screen is the actual monitor rectangle

If I set the target of orbitcontrols, the target will always be the center of the canvas element, right? I want it more left…

Another thing would be to keep a slight rotation of the camera, so the center is offsetted, but its still rotating around the target. Ive drawn another img:

Okay, thanks for the detailed explanation. Yes, in this case using target won’t work since the camera will always look at the focus point and orbiting around it.

Could the following issue be relevant to you?

1 Like

Hey coming back to this issue, the link above does not really fit my needs yet. This demo does what I need basicly, but I would like to have the features of OrbitControls still, like panning e.g. And it needs to work with orthographic camera as well.

I saw the post of autodesk, which is exactly what I need.
I also read that the PR is added to rXXX. I guess this means itll be done at some undefined time?

It’s a feature that’s potentially interesting and that might be added in the future.

This is my temporary solution to the missing features on OrbitControls

like this =^.^= (

1 Like