Instance Method

setTransformMatrix(_:relativeTo:)

Sets the transform of the entity relative to the given reference entity using a 4x4 matrix representation.

Declaration

func setTransformMatrix(_ transform: float4x4, relativeTo referenceEntity: Entity?)

Parameters

transform

A 4x4 transform matrix, given relative to referenceEntity.

referenceEntity

The entity that defines a frame of reference. Set this to nil to indicate world space.

See Also

Using a Matrix

func transformMatrix(relativeTo: Entity?) -> float4x4

Gets the 4x4 transform matrix of an entity relative to the given entity.