Back to Filament

setCamera

docs/android/dokka/filament-android/com.google.android.filament/-view/set-camera.md

1.75.0681 B
Original Source

//filament-android/com.google.android.filament/View/setCamera

setCamera

[main]
open fun setCamera(camera: Camera)

Sets this View's Camera.

This method associates the specified Camera with this View. A Camera can be associated with several View instances. To remove an existing association, simply pass null.

The View does not take ownership of the Scene pointer. Before destroying a Camera, be sure to remove it from all associated Views. If the camera isn't set, Renderer::render() will result in a no-op.

See also

getCamera