Back to Filament

setShift

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

1.75.0946 B
Original Source

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

setShift

[main]
open fun setShift(xshift: Double, yshift: Double)

Sets an additional matrix that shifts (translates) the projection matrix.

The shift parameters are specified in NDC coordinates, that is, if the translation must be specified in pixels, the xshift and yshift parameters be scaled by 1.0 / viewport.width and 1.0 / viewport.height respectively.

Parameters

main

xshifthorizontal shift in NDC coordinates applied after the projection
yshiftvertical shift in NDC coordinates applied after the projection

See also

com.google.android.filament.Camera