Contents

convert(position:from:)

Converts a position from the local space of a reference entity to the local space of the entity on which you called this method.

Declaration

@MainActor @preconcurrency func convert(position: SIMD3<Float>, from referenceEntity: Entity?) -> SIMD3<Float>

Parameters

  • position:

    The position specified relative to referenceEntity.

  • referenceEntity:

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

Return Value

The position given in the local space of the entity.

See Also

Converting values between coordinate spaces