Skip to content

Commit ff550b0

Browse files
Fix the zoom in 3d view to zoom at the cursor (#496)
1 parent 4ceb201 commit ff550b0

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/react-three/OrbitControls.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,9 @@ export const OrbitControls: React.FC<OrbitControlsProps> = ({
4242
if (zoomSpeed !== undefined) controls.zoomSpeed = zoomSpeed
4343
if (enableDamping !== undefined) controls.enableDamping = enableDamping
4444
if (dampingFactor !== undefined) controls.dampingFactor = dampingFactor
45+
46+
controls.zoomToCursor = true
47+
4548
if (target) {
4649
controls.target.set(target[0], target[1], target[2])
4750
controls.update()

0 commit comments

Comments
 (0)