OrbitCameraController

Drives a CameraState using a Filament Manipulator in ORBIT mode.

Create with rememberOrbitCameraController, pass the same CameraState to FilamentView, and attach Modifier.orbitGestures to the view's surface. The gesture modifier keeps the manipulator's viewport in sync with the element's size automatically.

Functions

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 the camera back to the pose it had when this controller was created.

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.