OrbitControls Pan

I use Orbit Controls without rotation.

const controls = new OrbitControls(camera, renderer.domElement);
controls.enableRotate = false;
controls.update();

I need only pan functionality but in a slightly different way. Pan an x ​​and y axis instead of z axis.
I use link below for importing orbit controls.

import { OrbitControls } from ‘https://cdn.jsdelivr.net/npm/[email protected]/examples/jsm/controls/OrbitControls.js’;

controls.screenSpacePanning = true;

I found a solution . Maybe help someone.

2 Likes