Instance Method

position(relativeTo:)

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

Declaration

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

Parameters

referenceEntity

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

Return Value

The position of the entity relative to referenceEntity.

See Also

Positioning an Entity

var position: SIMD3<Float>

The position of the entity relative to its parent.

func setPosition(SIMD3<Float>, relativeTo: Entity?)

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