diff --git a/apps/editor/components/editor/custom-camera-controls.tsx b/apps/editor/components/editor/custom-camera-controls.tsx
index 7d2ddc17..84854413 100644
--- a/apps/editor/components/editor/custom-camera-controls.tsx
+++ b/apps/editor/components/editor/custom-camera-controls.tsx
@@ -48,21 +48,22 @@ export const CustomCameraControls = () => {
}, [currentLevelId]);
// Configure mouse buttons based on control mode and camera mode
+ const cameraMode = useViewer((state) => state.cameraMode);
const mouseButtons = useMemo(() => {
// Use ZOOM for orthographic camera, DOLLY for perspective camera
- // const wheelAction =
- // cameraMode === 'orthographic'
- // ? CameraControlsImpl.ACTION.ZOOM
- // : CameraControlsImpl.ACTION.DOLLY
- const wheelAction = CameraControlsImpl.ACTION.DOLLY;
+ const wheelAction =
+ cameraMode === 'orthographic'
+ ? CameraControlsImpl.ACTION.ZOOM
+ : CameraControlsImpl.ACTION.DOLLY
return {
left: CameraControlsImpl.ACTION.NONE,
middle: CameraControlsImpl.ACTION.SCREEN_PAN,
right: CameraControlsImpl.ACTION.ROTATE,
wheel: wheelAction,
- };
- }, []);
+ }
+ }, [cameraMode]);
+
useEffect(() => {
const handleNodeCapture = ({ nodeId }: CameraControlEvent) => {
@@ -110,5 +111,8 @@ export const CustomCameraControls = () => {
};
}, []);
- return ;
+ return ;
};