Instance Method

move(to:relativeTo:)

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

Declaration

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

func move(to: float4x4, relativeTo: Entity?)

Moves an entity instantly to a new location given by a 4x4 matrix.

func look(at: SIMD3<Float>, from: SIMD3<Float>, upVector: SIMD3<Float>, relativeTo: Entity?)

Positions and orients the entity towards a target from a given position.