Contents

setPosition(_:relativeTo:)

Sets the position of the entity relative to the given reference entity.

Declaration

@MainActor @preconcurrency func setPosition(_ position: SIMD3<Float>, relativeTo referenceEntity: Entity?)

Parameters

  • position:

    A new position, relative to referenceEntity.

  • referenceEntity:

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

See Also

Positioning an entity