FlightCameraController

Drives a CameraState using a Filament Manipulator in FLIGHT mode (first-person).

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 initialMoveSpeedmaxMoveSpeed curve; one unit of steps is one of speedSteps. Driven by the scroll wheel in Modifier.flightGestures.

Link copied to clipboard
open override fun jumpToBookmark(bookmark: Manipulator.Bookmark)

Restore a pose previously captured with saveBookmark.

Link copied to clipboard
open override fun resetToHome()

Snap back to the flight start position/orientation set at creation.

Link copied to clipboard
open override fun saveBookmark(): Manipulator.Bookmark

Capture the current camera pose as a bookmark to restore later with jumpToBookmark.

Link copied to clipboard
open override fun setViewport(width: Int, height: Int)

Viewport size in px. Kept in sync automatically by the matching gesture modifier; call manually only when driving the manipulator without one.

Link copied to clipboard
fun update(deltaTime: Float)

Advance the camera simulation by deltaTime seconds. Flight-only; driven automatically per frame by rememberFlightCameraController, so callers rarely call it directly.