transformMatrix(relativeTo:)
Returns the 4 x 4 transform matrix of an entity relative to the given coordinate space.
Declaration
@MainActor @preconcurrency func transformMatrix(relativeTo referenceSpace: Entity.CoordinateSpaceReference) -> float4x4?Parameters
- referenceSpace:
The coordinate space that defines a frame of reference.
Return Value
The transform of the entity relative to referenceSpace, or nil when the given coordinate space is not applicable to the given entity.
Discussion
This method overloads transformMatrix(relativeTo:).