---
title: HasTransform
framework: realitykit
role: symbol
role_heading: Protocol
path: realitykit/hastransform
---

# HasTransform

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

## Declaration

```swift
@MainActor @preconcurrency protocol HasTransform : Entity
```

## Overview

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

- [transform](realitykit/hastransform/transform.md)

### Scaling an entity

- [scale](realitykit/hastransform/scale.md)
- [scale(relativeTo:)](realitykit/hastransform/scale(relativeto:).md)
- [setScale(_:relativeTo:)](realitykit/hastransform/setscale(_:relativeto:).md)

### Rotating an entity

- [orientation](realitykit/hastransform/orientation.md)
- [orientation(relativeTo:)](realitykit/hastransform/orientation(relativeto:).md)
- [setOrientation(_:relativeTo:)](realitykit/hastransform/setorientation(_:relativeto:).md)

### Positioning an entity

- [position](realitykit/hastransform/position.md)
- [position(relativeTo:)](realitykit/hastransform/position(relativeto:).md)
- [setPosition(_:relativeTo:)](realitykit/hastransform/setposition(_:relativeto:).md)

### Using a matrix

- [Transforming entities between RealityKit coordinate spaces](realitykit/transforming-entities-between-realitykit-coordinate-spaces.md)
- [transformMatrix(relativeTo:)](realitykit/hastransform/transformmatrix(relativeto:).md)

### Moving an entity

- [move(to:relativeTo:)](realitykit/hastransform/move(to:relativeto:)-6lohd.md)
- [move(to:relativeTo:)](realitykit/hastransform/move(to:relativeto:)-6jul8.md)
- [look(at:from:upVector:relativeTo:)](realitykit/hastransform/look(at:from:upvector:relativeto:).md)
- [look(at:from:upVector:relativeTo:forward:)](realitykit/hastransform/look(at:from:upvector:relativeto:forward:).md)
- [align(_:to:)](realitykit/hastransform/align(_:to:).md)

### Animating an entity

- [move(to:relativeTo:duration:timingFunction:)](realitykit/hastransform/move(to:relativeto:duration:timingfunction:)-35qp2.md)
- [move(to:relativeTo:duration:timingFunction:)](realitykit/hastransform/move(to:relativeto:duration:timingfunction:)-6la93.md)

### Converting values between coordinate spaces

- [convert(position:from:)](realitykit/hastransform/convert(position:from:).md)
- [convert(position:to:)](realitykit/hastransform/convert(position:to:).md)
- [convert(direction:from:)](realitykit/hastransform/convert(direction:from:).md)
- [convert(direction:to:)](realitykit/hastransform/convert(direction:to:).md)
- [convert(normal:from:)](realitykit/hastransform/convert(normal:from:).md)
- [convert(normal:to:)](realitykit/hastransform/convert(normal:to:).md)
- [convert(transform:from:)](realitykit/hastransform/convert(transform:from:).md)
- [convert(transform:to:)](realitykit/hastransform/convert(transform:to:).md)

### Getting a bounding box

- [visualBounds(recursive:relativeTo:excludeInactive:)](realitykit/hastransform/visualbounds(recursive:relativeto:excludeinactive:).md)

### Instance Methods

- [move(to:relativeTo:)](realitykit/hastransform/move(to:relativeto:).md)
- [move(to:relativeTo:duration:timingFunction:)](realitykit/hastransform/move(to:relativeto:duration:timingfunction:).md)
- [setTransformMatrix(_:relativeTo:)](realitykit/hastransform/settransformmatrix(_:relativeto:).md)

## Relationships

### Inherits From

- [Entity](realitykit/entity.md)

### Inherited By

- [HasBodyTracking](realitykit/hasbodytracking.md)
- [HasCollision](realitykit/hascollision.md)
- [HasDirectionalLight](realitykit/hasdirectionallight.md)
- [HasModel](realitykit/hasmodel.md)
- [HasPerspectiveCamera](realitykit/hasperspectivecamera.md)
- [HasPhysics](realitykit/hasphysics.md)
- [HasPhysicsBody](realitykit/hasphysicsbody.md)
- [HasPointLight](realitykit/haspointlight.md)
- [HasSpotLight](realitykit/hasspotlight.md)

### Conforming Types

- [AnchorEntity](realitykit/anchorentity.md)
- [BodyTrackedEntity](realitykit/bodytrackedentity.md)
- [DirectionalLight](realitykit/directionallight.md)
- [Entity](realitykit/entity.md)
- [ModelEntity](realitykit/modelentity.md)
- [PerspectiveCamera](realitykit/perspectivecamera.md)
- [PointLight](realitykit/pointlight.md)
- [SpotLight](realitykit/spotlight.md)
- [TriggerVolume](realitykit/triggervolume.md)
- [ViewAttachmentEntity](realitykit/viewattachmententity.md)

## See Also

### Positioning entities in space

- [Transform](realitykit/transform.md)
- [transformMatrix(relativeTo:)](realitykit/entity/transformmatrix(relativeto:).md)
- [Entity.CoordinateSpaceReference](realitykit/entity/coordinatespacereference.md)
- [Entity.ForwardDirection](realitykit/entity/forwarddirection.md)
