ArcballControls: How make pan not in screne space?

Just like “OrbitControls.screenSpacePanning” have a field to set true or false or other methods.

1 Like

Hello, @cgusercom ADP Vantage

In Three.js, the OrbitControls.screenSpacePanning property determines how panning is handled. When set to true, panning moves the camera in screen space, meaning it will pan parallel to the view plane. When set to false, panning moves the camera in the plane orthogonal to the camera’s up direction, which is typically parallel to the ground plane.

Here’s a code snippet to illustrate how you can set this property:
// Assuming ‘controls’ is an instance of OrbitControls
controls.screenSpacePanning = true; // Enables screen-space panning
controls.screenSpacePanning = false; // Enables panning parallel to the ground plane

Remember to call controls.update() in your animation loop after changing this property to ensure the changes take effect.

Best Regard,

Thanks @ryan1969 replay! But I want to know how make same thing in ArcballControls.
Maybe write or change something in “ArcballControls.pan()” method?

In ArcballControls, pan always in screen space, and I want to pan in world space.

1 Like