transformMatrix(relativeTo:)
Gets the 4 x 4 transform matrix of an entity relative to the given entity.
Declaration
@MainActor @preconcurrency func transformMatrix(relativeTo referenceEntity: Entity?) -> float4x4Parameters
- referenceEntity:
The entity that defines a frame of reference. Set this to
nilto indicate world space.
Return Value
The transform of the entity relative to referenceEntity.