HasTransform
An interface that enables manipulating the scale, rotation, and translation of an entity.
Declaration
@MainActor @preconcurrency protocol HasTransform : EntityOverview
All entities automatically adopt this protocol because the Entity base class does. This adoption gives all entities a Transform component, and a collection of methods for manipulating the component, that you use to position the entity in space.
Topics
Accessing the component
Scaling an entity
Rotating an entity
Positioning an entity
Using a matrix
Moving an entity
move(to:relativeTo:)move(to:relativeTo:)look(at:from:upVector:relativeTo:)look(at:from:upVector:relativeTo:forward:)align(_:to:)
Animating an entity
Converting values between coordinate spaces
convert(position:from:)convert(position:to:)convert(direction:from:)convert(direction:to:)convert(normal:from:)convert(normal:to:)convert(transform:from:)convert(transform:to:)