# rotationAxis

> The rotation axes affected by the ParentConstraint.

## Definition

* **Type:** Property
* **Namespace:** [UnityEngine.Animations](/engine/6000.6/script-reference/unityengine/animations.md)
* **Assembly:** UnityEngine.AnimationModule

```csharp
public Axis rotationAxis { get; set; }
```

### Remarks

Use this property to restrict the rotation of the constrained object on a particular axis.

### Examples

```csharp
using UnityEngine.Animations;

public class ConstraintAxis
{
    public void ConstrainOnlyOnXY(ParentConstraint component)
    {
        component.rotationAxis = Axis.X | Axis.Y;
    }
}
```
