# Physics Constraint Fixed component reference

> Explore the properties you can use to fix two 2D Physics Core objects to the same position and rotation with a spring.

Explore the properties you can use to keep two connected 2D Physics Core objects at the same position and rotation. For more information, refer to [Add a constraint](/engine/6000.7/manual/unity2d/2d-physics-api/connect-objects/create-constraint.md).

> **Note:**
>
> This documentation is about using Pose, Area, and Constraint components. To use 2D physics in the Unity Editor using components like the Rigidbody 2D component, refer to [2D physics](/engine/6000.7/manual/unity2d/2d-physics.md.md) instead.

## Pose

| **Property**      | **Description**                                                                                                                                                                                                                                                              |
| ----------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Pose A Source** | Sets how Unity finds the first object this constraint connects to. The options are:**Auto**: Searches this GameObject and its parents for a Physics Pose component.**Custom**: Uses the Physics Pose component you assign to **Pose A Target**.                              |
| **Pose A Target** | Sets the first Physics Pose component this constraint connects to. This property is available only if you set **Pose A Source** to **Custom**. Drag a GameObject with a Physics Pose component from the **Hierarchy** window to this property, or select the picker (**⊙**). |
| **Pose B Target** | Sets the second object this constraint connects. Drag a GameObject with a Physics Pose component from the **Hierarchy** window to this property, or select the picker (**⊙**).                                                                                               |
| **Refresh Poses** | Refreshes **Pose A Target** and **Pose B Target** and recreates the constraint.                                                                                                                                                                                              |

## Definition

| **Property**          | **Description**                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
| --------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Definition Asset**  | Sets an asset that sets the values of the properties in this section. By default, this property is empty, and Unity stores the values inside the component. To set a definition asset, drag a Physics Constraint Fixed Definition asset from the **Project** window to this property, or select the picker (**⊙**). For more information, refer to [Share properties across multiple 2D Physics Core components](/engine/6000.7/manual/unity2d/2d-physics-api/properties/definitions.md). |
| **Linear Frequency**  | Sets the stiffness of the spring that tries to keep the positions of the two objects the same, in Hertz (cycles per second). A higher value makes the constraint less stiff. The default is 0.                                                                                                                                                                                                                                                                                            |
| **Linear Damping**    | Sets how quickly the spring stops pulling or pushing. A higher value makes the constraint settle more quickly. The default is 0.                                                                                                                                                                                                                                                                                                                                                          |
| **Angular Frequency** | Sets the stiffness of the spring that tries to keep the rotation of the two objects the same, in Hertz (cycles per second). A higher value makes the constraint's rotation less stiff. The default is 0.                                                                                                                                                                                                                                                                                  |
| **Angular Damping**   | Sets how quickly the spring stops rotating. A higher value makes the rotation of the constraint settle more quickly. The default is 0.                                                                                                                                                                                                                                                                                                                                                    |
| **Collide Connected** | Allows the shapes on the two connected objects to collide with each other and create collision or trigger events. By default, the constraint prevents this. For more information, refer to [Collisions and interactions in 2D Physics Core](/engine/6000.7/manual/unity2d/2d-physics-api/interactions.md).                                                                                                                                                                                |

### Anchors

Set where each end of the constraint attaches. **Local Anchor A** attaches to the first object and **Local Anchor B** attaches to the second object. Each anchor has the following properties.

| **Property** | **Description**                                                                                                                                                                      |
| ------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| **Auto**     | Automatically calculates the anchor position and rotation from the positions of the two objects when Unity creates the constraint. As a result, both anchors line up in world space. |
| **Position** | Sets the position of the anchor, relative to the position of the object it attaches to. This property is available only if you disable **Auto**.                                     |
| **Rotation** | Sets the rotation of the anchor in degrees. This property is available only if you disable **Auto**.                                                                                 |

### Thresholds

| **Property**         | **Description**                                                                 |
| -------------------- | ------------------------------------------------------------------------------- |
| **Force Threshold**  | Sets the amount of linear force that creates an `OnJointThreshold2D` event.     |
| **Torque Threshold** | Sets the amount of rotational force that creates an `OnJointThreshold2D` event. |

### Tuning

| **Property**         | **Description**                                                                                                            |
| -------------------- | -------------------------------------------------------------------------------------------------------------------------- |
| **Tuning Frequency** | Sets the overall stiffness of the constraint in Hertz (cycles per second). A higher value makes the constraint less stiff. |
| **Tuning Damping**   | Sets how quickly overall the constraint stops pulling or pushing. A higher value makes the constraint settle more quickly. |

### Drawing

| **Property**      | **Description**                                                                                                                                                                                                                       |
| ----------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Draw Scale**    | Scales the constraint Unity draws as a debug visualization. For more information, refer to [Visualize and edit 2D Physics Core scenes](/engine/6000.7/manual/unity2d/2d-physics-api/create-objects/debug-drawing.md).                 |
| **World Drawing** | Draws the constraint when Unity draws the debug visualization of the world. For more information, refer to [Visualize and edit 2D Physics Core scenes](/engine/6000.7/manual/unity2d/2d-physics-api/create-objects/debug-drawing.md). |

## Callbacks

| **Property**        | **Description**                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| ------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Callback Source** | Sets the callback method the constraint calls when the force or torque exceeds **Force Threshold** or **Torque Threshold**. The options are:**Off**: Calls no callbacks.**Constraint**: Calls the [`PhysicsConstraintCallbacks.IJointThresholdCallback`](https://docs.unity3d.com/Packages/com.unity.2d.physics@latest?subfolder=/api/Unity.U2D.Physics.PhysicsConstraintCallbacks.IJointThresholdCallback.html) method on the **Callback Target** object, passing this component.**Joints**: Calls the [`PhysicsCallbacks.IJointThresholdCallback`](/engine/6000.7/script-reference/unity/u2d/physics/physicscallbacks/ijointthresholdcallback.md.md) method on the **Callback Target** object, passing the `Joint` object.**Events**: Calls a method or sets a parameter you select in the **On Joint Threshold (JointThresholdEvent)** section. |
| **Callback Target** | Sets the object that receives physics callbacks. This property is available only if you set **Callback Source** to **Constraint** or **Joints**.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |

### Event settings

The properties in this section set the specific method this constraint calls or the parameter it sets, and control the behavior of the `On Joint Threshold (JointThresholdEvent)` method of the component. This section is available only if you set **Callback Source** to **Events**.

| **Property**       | **Description**                                                                                                                                                                                                                                                                                                                                                        |
| ------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Activation**     | Sets when the constraint activates the callback method or sets the parameter. The options are:**Off**: Doesn't activate the callback method or set the parameter.**Editor and Runtime**: Activates the callback method or sets the parameter in the Unity Editor and at runtime.**Runtime Only**: Activates the callback method or sets the parameter only at runtime. |
| **Object**         | Sets the object with the method to call or parameter to update. Drag any object from the **Hierarchy** or **Project** windows to this property, or select the picker (**⊙**).                                                                                                                                                                                          |
| **Functions**      | Sets the parameter to update or the method to call. Select a parameter or method from the **Object**, its components, or its script methods. You can set the parameter value to update to, or the method parameters to use.                                                                                                                                            |
| **Add** (**+**)    | Adds a new callback method to the list.                                                                                                                                                                                                                                                                                                                                |
| **Remove** (**-**) | Removes the selected callback method from the list.                                                                                                                                                                                                                                                                                                                    |

## User Data

Use the properties in this section to add your own data to the component, and read it using the `U2D.Physics` API. For more information, refer to [Add custom data to a 2D Physics Core object](/engine/6000.7/manual/unity2d/2d-physics-api/properties/custom-data.md.md).

| **Property**     | **Description**                                                                                                                                                                                                             |
| ---------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Object**       | Sets a custom object. Drag any object from the **Hierarchy** or **Project** windows to this property, or select the picker (**⊙**).                                                                                         |
| **Physics Mask** | Sets a custom set of enabled and disabled layers. For more information, refer to [Configure collisions between 2D Physics Core objects](/engine/6000.7/manual/unity2d/2d-physics-api/interactions/collisions-enable.md.md). |
| **Float**        | Sets a custom floating-point number.                                                                                                                                                                                        |
| **Int**          | Sets a custom integer.                                                                                                                                                                                                      |
| **Int 64**       | Sets a custom 64-bit integer.                                                                                                                                                                                               |
| **Vector 3 Int** | Sets a custom 3D vector of integers.                                                                                                                                                                                        |
| **Bool**         | Sets a custom Boolean value.                                                                                                                                                                                                |

## Info

This section displays information about the constraint. You can't directly edit the properties in this section.

### Handle

| **Property**   | **Description**                                                                                    |
| -------------- | -------------------------------------------------------------------------------------------------- |
| **Valid**      | The state of the object. **True** means the object is in the simulation.                           |
| **World**      | The index number of the world the object belongs to. The default is 0, which is the default world. |
| **Index**      | The index number of the object in the world.                                                       |
| **Generation** | The number of times Unity has used the same **Index** for different objects.                       |

### Callbacks

This section is visible only if you set **Callback Source** to a value other than **Off**.

| **Property**        | **Description**                                                     |
| ------------------- | ------------------------------------------------------------------- |
| **Joint Threshold** | How many times a joint callback was dispatched to a valid receiver. |

### Other properties

| **Property**          | **Description**                                                   |
| --------------------- | ----------------------------------------------------------------- |
| **Constraint Force**  | The current force the constraint applies, as a vector in newtons. |
| **Constraint Torque** | The current torque the constraint applies, in newton-meters.      |

## Additional resources

* [Add a constraint](/engine/6000.7/manual/unity2d/2d-physics-api/connect-objects/create-constraint.md)
* [Introduction to constraints](/engine/6000.7/manual/unity2d/2d-physics-api/connect-objects/joints.md)
* [Share properties across multiple 2D Physics Core components](/engine/6000.7/manual/unity2d/2d-physics-api/properties/definitions.md)
* [Add physics to a GameObject with 2D Physics Core](/engine/6000.7/manual/unity2d/2d-physics-api/create-objects/physics-object.md)
* [Configure global 2D Physics Core settings](/engine/6000.7/manual/unity2d/2d-physics-api/properties/class-physics-core-settings2d.md)
* [`PhysicsFixedJointDefinition`](/engine/6000.7/script-reference/unity/u2d/physics/physicsfixedjointdefinition.md)
