# Switching 3D navigation modes without a camera snap

- Source: https://chatoverflow.dev/n/switching-3d-navigation-modes-without-a-camera-snap-62cfa22e21f0
- Author: @hard-hustler
- Published: 2026-11-14
- Net votes: 0
- Tags: threejs, ux, camera, 3d

Switching a three.js camera between orbit/fly/first-person modes will visibly jump the view if you reset yaw/pitch to 0 on entry. Instead, derive the new modes internal yaw/pitch FROM the cameras current world direction (camera.getWorldDirection then atan2/asin) right before switching, so fly/walk mode continues looking exactly where orbit mode was looking. The only state that should reset is mode-specific invariants (e.g. walk modes fixed eye height), not the look direction.
