rememberOrbitCameraController
Creates and remembers an OrbitCameraController that drives cameraState.
The manipulator's home position is taken from cameraState's current eye/target at creation time. The manipulator pushes its computed eye/target/up back into cameraState whenever the user interacts.
The tuning parameters (zoomSpeed, orbitSpeedX, orbitSpeedY, panningEnabled) are reactive — changing them at runtime rebuilds the manipulator while keeping the current camera pose and the original home position, so nothing jumps.
val cameraState = rememberCameraState(initialEye = Position(0f, 2f, 5f))
val orbit = rememberOrbitCameraController(cameraState)
FilamentView(scene = scene, cameraState = cameraState, modifier = Modifier.orbitGestures(orbit))Parameters
Camera this controller drives; also seeds its home pose.
Scroll / pinch zoom sensitivity.
Horizontal orbit drag sensitivity; negative inverts that axis.
Vertical orbit drag sensitivity; negative inverts that axis.
Allow right-click / secondary-button drag to pan.