rememberFlightCameraController

fun rememberFlightCameraController(cameraState: CameraState, startPitch: Float = 0.0f, startYaw: Float = 0.0f, maxMoveSpeed: Float = 10.0f, initialMoveSpeed: Float = 1.0f, speedSteps: Int = 20, moveDamping: Float = 15.0f, panSpeedX: Float = 0.01f, panSpeedY: Float = 0.01f): FlightCameraController

Creates and remembers a FlightCameraController driving cameraState in FLIGHT mode.

The manipulator's start position is taken from cameraState.eye at creation time.

The tuning parameters are reactive — changing them at runtime rebuilds the manipulator while keeping the current camera pose and the current scroll-wheel speed, so nothing jumps; startPitch/startYaw only define the initial (and resetToHome) orientation.

Speed sits on an exponential curve spanning speedSteps scroll notches: the camera starts at initialMoveSpeed, full scroll-up reaches maxMoveSpeed, full scroll-down 1 / maxMoveSpeed.

Parameters

cameraState

Camera this controller drives; also seeds its start pose.

startPitch

Initial pitch in degrees (positive = look up).

startYaw

Initial yaw in degrees.

maxMoveSpeed

Movement speed in world units per second at full scroll-up.

initialMoveSpeed

Movement speed before any scrolling; must be > 0.

speedSteps

Scroll notches spanning the whole speed range (fewer = coarser steps).

moveDamping

Movement damping (higher = snappier stop).

panSpeedX

Mouse-look horizontal sensitivity; negative inverts that axis.

panSpeedY

Mouse-look vertical sensitivity; negative inverts that axis (the classic "inverted look" — cursor up looks down).