<!--
{
  "availability" : [
    "iOS: 8.0.0 -",
    "iPadOS: 8.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.10.0 -",
    "tvOS: 9.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "GameController",
  "identifier" : "/documentation/GameController/GCMotion",
  "metadataVersion" : "0.1.0",
  "role" : "Class",
  "symbol" : {
    "kind" : "Class",
    "modules" : [
      "Game Controller"
    ],
    "preciseIdentifier" : "c:objc(cs)GCMotion"
  },
  "title" : "GCMotion"
}
-->

# GCMotion

A controller profile that supports orientation and motion.

```
class GCMotion
```

## 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`](/documentation/GameController/GCController/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.

![An illustration of a vertical iPhone with the  x-axis passing through its center from side to side, the y-axis passing through its center from top to bottom, and the z-axis passing through its center from back to front.](images/com.apple.gamecontroller/media-2930224@2x.png)

## Topics

### Getting the Controller

[`controller`](/documentation/GameController/GCMotion/controller)

The controller for the profile.

### Receiving a Callback When Input Values Change

[`valueChangedHandler`](/documentation/GameController/GCMotion/valueChangedHandler)

The block that the profile calls when an element’s value changes.

[`GCMotionValueChangedHandler`](/documentation/GameController/GCMotionValueChangedHandler)

The signature for the block that the profile calls when an element’s value changes.

### Verifying Capabilities

[`hasAttitude`](/documentation/GameController/GCMotion/hasAttitude)

A Boolean value that indicates whether the controller provides attitude data.

[`hasRotationRate`](/documentation/GameController/GCMotion/hasRotationRate)

A Boolean value that indicates whether the controller provides rotation data.

[`hasGravityAndUserAcceleration`](/documentation/GameController/GCMotion/hasGravityAndUserAcceleration)

A Boolean value that indicates whether the controller provides gravity and user acceleration data.

[`hasAttitudeAndRotationRate`](/documentation/GameController/GCMotion/hasAttitudeAndRotationRate)

A Boolean value that indicates whether the controller provides attitude and rotation data.

### Accessing Attitude and Rotation Data

[`attitude`](/documentation/GameController/GCMotion/attitude)

The attitude of the controller.

[`GCQuaternion`](/documentation/GameController/GCQuaternion)

A quaternion that represents a controller’s measurement of attitude.

[`rotationRate`](/documentation/GameController/GCMotion/rotationRate)

The rotation rate of the controller.

[`GCRotationRate`](/documentation/GameController/GCRotationRate)

A structure that represents rotation rates around the x, y, and z axes.

[`GCEulerAngles`](/documentation/GameController/GCEulerAngles)

A structure that specifies the controller’s attitude as a series of rotations around the x, y, and z axes.

### Accessing Gravity and Acceleration Data

[`acceleration`](/documentation/GameController/GCMotion/acceleration)

The total acceleration of the controller that includes gravity and the acceleration the user applies to the controller.

[`gravity`](/documentation/GameController/GCMotion/gravity)

The gravity acceleration vector from the controller’s reference frame.

[`userAcceleration`](/documentation/GameController/GCMotion/userAcceleration)

The acceleration that the user applies to the controller.

[`GCAcceleration`](/documentation/GameController/GCAcceleration)

A three-dimensional acceleration vector.

### Accessing Sensor Data

[`sensorsRequireManualActivation`](/documentation/GameController/GCMotion/sensorsRequireManualActivation)

A Boolean value that indicates whether the sensors that compute the motion data require manual activation.

[`sensorsActive`](/documentation/GameController/GCMotion/sensorsActive)

A Boolean value that indicates whether the sensors that compute the motion data are active.

### Setting Snapshot Values

[`setStateFrom(_:)`](/documentation/GameController/GCMotion/setStateFrom(_:))

Copies the input values from a specified motion profile to a snapshot of a motion profile.

[`setAttitude(_:)`](/documentation/GameController/GCMotion/setAttitude(_:))

Sets the controller’s attitude.

[`setRotationRate(_:)`](/documentation/GameController/GCMotion/setRotationRate(_:))

Sets the controller’s rotation rate.

[`setAcceleration(_:)`](/documentation/GameController/GCMotion/setAcceleration(_:))

Sets the total acceleration of the controller that includes gravity and the user’s acceleration.

[`setGravity(_:)`](/documentation/GameController/GCMotion/setGravity(_:))

Sets the controller’s gravity data.

[`setUserAcceleration(_:)`](/documentation/GameController/GCMotion/setUserAcceleration(_:))

Sets the acceleration the user applies to the controller.



---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)