Contents

move(to:relativeTo:)

Moves an entity instantly to a new location given by a transform.

Declaration

@MainActor @preconcurrency func move(to transform: Transform, relativeTo referenceEntity: Entity?)

Parameters

  • transform:

    A Transform instance that indicates the new location.

  • referenceEntity:

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

See Also

Moving an entity