# constraints

> Get/Set the degrees of freedom constraints (locks) for the body of Linear X, Linear Y and Rotation Z.

## Definition

* **Type:** Property
* **Namespace:** [Unity.U2D.Physics](/engine/6000.6/script-reference/unity/u2d/physics.md)
* **Assembly:** UnityEngine.PhysicsCore2DModule

```csharp
public PhysicsBody.BodyConstraints constraints { get; set; }
```
