FlightCameraController

Drives a CameraState using a Filament Manipulator in FLIGHT mode (first-person), for its damped movement and speed curve. A viewpoint written to the state (by the app or CameraState.animateTo) is where it flies on from.

The per-frame simulation is driven automatically by rememberFlightCameraController (via OnFrame) — you don't need a separate loop composable.

Functions

Link copied to clipboard
fun adjustSpeed(steps: Float)

Step the movement speed along the initialMoveSpeed…maxMoveSpeed curve; one unit of steps is one of speedSteps. Driven by the scroll wheel in Modifier.flightGestures.

Link copied to clipboard
open override fun resetToHome()

Snap the camera back to the pose it had when this controller was first created.

Link copied to clipboard
fun update(deltaTime: Float)

Advance the camera simulation by deltaTime seconds. Driven automatically per frame by rememberFlightCameraController, so callers rarely call it directly.