Contents

HasTransform

An interface that enables manipulating the scale, rotation, and translation of an entity.

Declaration

@MainActor @preconcurrency protocol HasTransform : Entity

Overview

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

Animating an entity

Converting values between coordinate spaces

Getting a bounding box

Instance Methods

See Also

Positioning entities in space