convert(transform:to:)
Converts the scale, rotation, and position of a transform from the local space of the entity on which you called this method to the local space of a reference entity.
Declaration
@MainActor @preconcurrency func convert(transform: Transform, to referenceEntity: Entity?) -> TransformParameters
- transform:
The transform given in the local space of the entity.
- referenceEntity:
The entity that defines a frame of reference. Set this to
nilto indicate world space.
Return Value
The transform specified relative to referenceEntity.