Instance Method

setPosition(_:relativeTo:)

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

Declaration

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

var position: SIMD3<Float>

The position of the entity relative to its parent.

func position(relativeTo: Entity?) -> SIMD3<Float>

Gets the position of an entity relative to the given entity.