Back to Filament

getForwardVector

docs/android/dokka/filament-android/com.google.android.filament/-camera/get-forward-vector.md

1.75.0991 B
Original Source

//filament-android/com.google.android.filament/Camera/getForwardVector

getForwardVector

[main]
open fun getForwardVector(out: Array<Float>): Array<Float>

Retrieves the camera forward unit vector in world space, that is a unit vector that points in the direction the camera is looking at.

Return

A 3-float array containing the camera's forward vector in world units.

Parameters

main

outA 3-float array where the forward vector will be stored, or null in which case a new array is allocated.