Back to Filament

setTransform

docs/android/dokka/filament-android/com.google.android.filament/-transform-manager/set-transform.md

1.75.02.2 KB
Original Source

//filament-android/com.google.android.filament/TransformManager/setTransform

setTransform

[main]
open fun setTransform(i: Int, localTransform: Array<Float>)

Sets a local transform of a transform component.

This operation can be slow if the hierarchy of transform is too deep, and this will be particularly bad when updating a lot of transforms. In that case, consider using openLocalTransformTransaction / commitLocalTransformTransaction.

Parameters

main

ithe EntityInstance of the transform component to set the local transform to.
localTransformthe local transform (i.e. relative to the parent).

See also

getTransform

[main]
open fun setTransform(i: Int, localTransform: Array<Double>)

Sets a local transform of a transform component.

This operation can be slow if the hierarchy of transform is too deep, and this will be particularly bad when updating a lot of transforms. In that case, consider using openLocalTransformTransaction / commitLocalTransformTransaction.

Parameters

main

ithe EntityInstance of the transform component to set the local transform to.
localTransformthe local transform (i.e. relative to the parent).

See also

getTransform(int, double[])
getWorldTransform(int, double[])