---
title: GCMotion
framework: gamecontroller
role: symbol
role_heading: Class
path: gamecontroller/gcmotion
---

# GCMotion

A controller profile that supports orientation and motion.

## Declaration

```swift
class GCMotion
```

## Overview

Overview The motion controller profile provides attitude and rotation data, as well as acceleration and sensor information. Use this profile to get motion input from a controller that measures acceleration and rotation rate. If the controller’s motion property is a GCMotion object, the controller supports motion. This illustration shows the direction of the x, y, and z axes of an iPhone when held upright.

## Topics

### Getting the Controller

- [controller](gamecontroller/gcmotion/controller.md)

### Receiving a Callback When Input Values Change

- [valueChangedHandler](gamecontroller/gcmotion/valuechangedhandler.md)
- [GCMotionValueChangedHandler](gamecontroller/gcmotionvaluechangedhandler.md)

### Verifying Capabilities

- [hasAttitude](gamecontroller/gcmotion/hasattitude.md)
- [hasRotationRate](gamecontroller/gcmotion/hasrotationrate.md)
- [hasGravityAndUserAcceleration](gamecontroller/gcmotion/hasgravityanduseracceleration.md)
- [hasAttitudeAndRotationRate](gamecontroller/gcmotion/hasattitudeandrotationrate.md)

### Accessing Attitude and Rotation Data

- [attitude](gamecontroller/gcmotion/attitude.md)
- [GCQuaternion](gamecontroller/gcquaternion.md)
- [rotationRate](gamecontroller/gcmotion/rotationrate.md)
- [GCRotationRate](gamecontroller/gcrotationrate.md)
- [GCEulerAngles](gamecontroller/gceulerangles.md)

### Accessing Gravity and Acceleration Data

- [acceleration](gamecontroller/gcmotion/acceleration.md)
- [gravity](gamecontroller/gcmotion/gravity.md)
- [userAcceleration](gamecontroller/gcmotion/useracceleration.md)
- [GCAcceleration](gamecontroller/gcacceleration.md)

### Accessing Sensor Data

- [sensorsRequireManualActivation](gamecontroller/gcmotion/sensorsrequiremanualactivation.md)
- [sensorsActive](gamecontroller/gcmotion/sensorsactive.md)

### Setting Snapshot Values

- [setStateFrom(_:)](gamecontroller/gcmotion/setstatefrom(_:).md)
- [setAttitude(_:)](gamecontroller/gcmotion/setattitude(_:).md)
- [setRotationRate(_:)](gamecontroller/gcmotion/setrotationrate(_:).md)
- [setAcceleration(_:)](gamecontroller/gcmotion/setacceleration(_:).md)
- [setGravity(_:)](gamecontroller/gcmotion/setgravity(_:).md)
- [setUserAcceleration(_:)](gamecontroller/gcmotion/setuseracceleration(_:).md)

## Relationships

### Inherits From

- [NSObject](objectivec/nsobject-swift.class.md)

### Conforms To

- [CVarArg](swift/cvararg.md)
- [CustomDebugStringConvertible](swift/customdebugstringconvertible.md)
- [CustomStringConvertible](swift/customstringconvertible.md)
- [Equatable](swift/equatable.md)
- [Hashable](swift/hashable.md)
- [NSObjectProtocol](objectivec/nsobjectprotocol.md)

## See Also

### Game controller profiles

- [Input](gamecontroller/input.md)
- [GCDeviceBattery](gamecontroller/gcdevicebattery.md)
- [GCDeviceHaptics](gamecontroller/gcdevicehaptics.md)
- [GCDeviceLight](gamecontroller/gcdevicelight.md)
