convert(position:to:)
Converts a position 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(position: SIMD3<Float>, to referenceEntity: Entity?) -> SIMD3<Float>Parameters
- position:
The position 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 position specified relative to referenceEntity.