# Physics Area Sprite component reference

> Explore the properties you can use to configure a Physics Area Sprite component in the Unity Editor using 2D Physics Core.

Explore the properties you can use to configure a Physics Area Sprite component in a 2D Physics Core object. For more information, refer to [Add physics to a sprite with 2D Physics Core](/engine/6000.7/manual/unity2d/2d-physics-api/create-objects/add-sprite.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 Source**  | Sets how Unity finds the Physics Pose component this area attaches to. The options are:**Auto**: Searches this GameObject and its parents for a Physics Pose component.**Custom**: Uses the Physics Pose component from the GameObject you set in the **Pose Target** property. |
| **Pose Target**  | Attaches this area to the Physics Pose component on this GameObject. Drag a GameObject with a Physics Pose component from the **Hierarchy** window to this property, or select the picker (**⊙**). This property is available only if you set **Pose Source** to **Custom**.    |
| **Refresh Pose** | Searches this GameObject and its parents again for a Physics Pose component. This property is available only if you set **Pose Source** to **Auto**.                                                                                                                            |

## Geometry

| **Property**               | **Description**                                                                                                                                                                                                                                                                                                                                                  |
| -------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Sprite Source**          | Sets which sprite Unity uses to create the shapes. The options are:**Sprite Renderer**: Uses the sprite assigned to the Sprite Renderer component on this GameObject.**Custom**: Uses the sprite you assign to the **Sprite** property.                                                                                                                          |
| **Sprite**                 | Sets the sprite Unity uses to create the shapes. This property is available only if you set **Sprite Source** to **Custom**.                                                                                                                                                                                                                                     |
| **Sprite Renderer Update** | Sets when Unity checks for changes to the sprite and updates the shapes. This property is available only if you set **Sprite Source** to **Sprite Renderer**. The options are:**Off**: Doesn't check for changes to the sprite.**Auto**: Checks for changes to the sprite every frame, and updates the shapes if the sprite changed.                             |
| **Flip**                   | Mirrors the shape along the x-axis or y-axis. This property is available only if you set **Sprite Source** to **Custom**. If you set **Sprite Source** to **Sprite Renderer**, Unity uses the **Flip** property from the Sprite Renderer component instead. The options are:**X**: Mirrors the shape along the x-axis.**Y**: Mirrors the shape along the y-axis. |
| **Read Sprite Renderer**   | Reads the sprite and its **Flip** values from the Sprite Renderer, and updates the shapes. This property is available only if you set **Sprite Source** to **Sprite Renderer** and **Sprite Renderer Update** to **Off**.                                                                                                                                        |
| **Output**                 | Sets how Unity creates the shapes. The options are:**Polygons**: Creates the shapes as filled polygons, and combines them if they overlap.**Segments**: Creates the shapes as hollow shapes, and combines them if they overlap.                                                                                                                                  |
| **Max Polygon Vertices**   | Sets the maximum number of vertices in each convex polygon. This property is available only if you set **Output** to **Polygons**.                                                                                                                                                                                                                               |
| **Use Delaunay**           | Enables Unity using a Delaunay triangulation algorithm to generate polygons. Enabling this property can improve shapes, but can reduce performance. This property is available only if you set **Output** to **Polygons**.                                                                                                                                       |
| **Reverse Winding**        | Reverses the direction of the vertices, which flips the side that the outline faces for collisions. This property is available only if you set **Output** to **Segments**.                                                                                                                                                                                       |

### Transformation

| **Property** | **Description**                                                                                                             |
| ------------ | --------------------------------------------------------------------------------------------------------------------------- |
| **Position** | Offsets the position of the area, relative to the **Position** property of the GameObject's Transform component.            |
| **Rotation** | Offsets the rotation of the area in degrees, relative to the **Rotation** property of the GameObject's Transform component. |
| **Scale**    | Offsets the scale of the area, relative to the **Scale** property of the GameObject's Transform component.                  |

## Definition

The properties in this section set the properties of the shape.

| **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 Area Definition asset from the **Project** window to this property, or select the picker (**⊙**). |

### Definition Overrides

The properties in this section override the properties from the **Definition Asset**, or the local values if no **Definition Asset** is assigned.

| **Property**       | **Description**                                                                           |
| ------------------ | ----------------------------------------------------------------------------------------- |
| **Contact Asset**  | Sets a Physics Contact Filter asset that overrides the **Contact Filter** properties.     |
| **Material Asset** | Sets a Physics Surface Material asset that overrides the **Surface Material** properties. |

### Contact Filter

The properties in the **Contact Filter** section determine which other shapes the area collides with. 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).

| **Property**    | **Description**                                                                                                                                                                                                                                                                                                                                                                                                                  |
| --------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Categories**  | Sets the layers this shape belongs to.                                                                                                                                                                                                                                                                                                                                                                                           |
| **Contacts**    | Sets the layers this shape collides with.                                                                                                                                                                                                                                                                                                                                                                                        |
| **Group Index** | Assigns the shape to a group, and overrides the **Categories** and **Contacts** properties. Use the following values:`0`: Assigns no group. The shape uses the **Categories** and **Contacts** properties to determine collisions.Positive value: The shape always collides with other shapes that have the same **Group Index**.Negative value: The shape doesn't collide with other shapes that have the same **Group Index**. |

### Surface Material

The properties in the **Surface Material** section determine how the shape interacts with other shapes.

| **Property**            | **Description**                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |
| ----------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| **Friction**            | Sets the coefficient of friction for this collider. A value of 0 means no friction, like ice. A value of 1 means very high friction, like rubber. The default is 0.6.                                                                                                                                                                                                                                                                                                                      |
| **Bounciness**          | Sets how bouncy the surface is, and how much other colliders bounce off it. A value of 0 means the surface isn't at all bouncy, like soft clay. A value of 1 means the surface is very bouncy, like rubber. The default is 0.                                                                                                                                                                                                                                                              |
| **Friction Mixing**     | Determines the method Unity uses to mix the friction of two objects when they make contact. The options are:**Average**: Uses the average of the two values.**Mean**: Uses the geometric mean of the two values. The geometric mean multiplies the two values then returns the square root.**Multiply**: Multiplies the two values together.**Minimum**: Uses the smaller value.**Maximum**: Uses the larger value.                                                                        |
| **Bounciness Mixing**   | Determines the method Unity uses to mix the bounciness of two objects when they make contact. The options are:**Average**: Uses the average of the two values.**Mean**: Uses the geometric mean of the two values. The geometric mean multiplies the two values then returns the square root.**Multiply**: Multiplies the two values together.**Minimum**: Uses the smaller value.**Maximum**: Uses the larger value.                                                                      |
| **Friction Priority**   | Determines which shape contributes its **Friction Mixing** mode when two shapes come into contact. Unity uses the **Friction Mixing** mode from the shape with the highest **Friction Priority** value. If the two shapes have the same **Friction Priority** value, Unity uses the highest `SurfaceMaterial.MixingMode` enumeration value from the two shapes.                                                                                                                            |
| **Bounciness Priority** | Determines which shape contributes its **Bounciness Mixing** mode when two shapes come into contact. Unity uses the **Bounciness Mixing** mode from the shape with the highest **Bounciness Priority** value. If the two shapes have the same **Bounciness Priority** value, Unity uses the highest `SurfaceMaterial.MixingMode` enumeration value from the two shapes.                                                                                                                    |
| **Rolling Resistance**  | Sets how resistant the shape is to rolling. The range of values is 0 to 1, where 0 means no rolling resistance and 1 means full rolling resistance.                                                                                                                                                                                                                                                                                                                                        |
| **Tangent Speed**       | Sets the speed the surface moves other objects that come into contact with it, in meters per second. For example, if you set **Tangent Speed** to 5, the surface acts like a conveyor belt that moves objects along the surface at 5 meters per second. You can use a positive or negative value to set the direction of movement.                                                                                                                                                         |
| **Custom Color**        | Overrides the color Unity uses to draw the debug visualization of the shape. The alpha value is ignored. The default is [`Color.Clear`](/engine/6000.7/script-reference/unityengine/color/clear.md.md), which is black with an alpha of 0, and means Unity uses different colors to represent the current state of the shape. 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.md). |

### Other properties

| **Property**                 | **Description**                                                                                                                                                                                                                                                                                                               |
| ---------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Density**                  | Sets the density in kg/m^2. The default is 1. Use this property to create a hollow shape for example.                                                                                                                                                                                                                         |
| **Is Trigger**               | Enables the shape going through other shapes without generating a collision response. Instead, the shape generates a trigger event when another shape overlaps. For more information, refer to [Introduction to collision in 2D Physics Core](/engine/6000.7/manual/unity2d/2d-physics-api/interactions/introduction.md.md).  |
| **Trigger Events**           | Produces a trigger event when the shape starts and ends overlapping another shape that has its **Is Trigger** property enabled. To fetch events, refer to [`PhysicsWorld.triggerBeginEvents`](/engine/6000.7/script-reference/unity/u2d/physics/physicsworld/triggerbeginevents.md.md).                                       |
| **Contact Events**           | Produces a contact event when the shape starts and ends contact with another shape. This property has no effect if the shape is attached to a body set to **Static**. To fetch events, refer to [`PhysicsWorld.contactBeginEvents`](/engine/6000.7/script-reference/unity/u2d/physics/physicsworld/contactbeginevents.md.md). |
| **Hit Events**               | Produces a hit event when the shape collides with another shape. This property has no effect if the shape is attached to a body set to **Static**. To fetch events, refer to [`PhysicsWorld.shapeHitEvents`](ScriptRef:Unity.U2D.Physics.PhysicsWorld.shapeHitEvents).                                                        |
| **Contact Filter Callbacks** | Calls the [`IContactFilterCallback`](/engine/6000.7/script-reference/unity/u2d/physics/physicscallbacks/icontactfiltercallback.md.md) method of the shape if it makes contact with another shape, so you can run your own code that determines whether the shapes should collide.                                             |
| **Pre Solve Callbacks**      | Calls the [`OnPreSolve2D`](ScriptRef:Unity.U2D.Physics.PhysicsCallbacks.IPreSolveCallback.OnPreSolve2D) method of the dynamic body before Unity calculates the collision response, so you can run your own code.                                                                                                              |
| **Start Static Contacts**    | Produces a contact event if the shape is attached to a body set to **Static**, and the shape makes contact with another shape. Enabling this property can reduce performance if you have many static shapes.                                                                                                                  |
| **Start Mass Update**        | Updates the mass of the body when the shape is created. Disabling this property can improve performance if you add multiple shapes to the same body, but you must call [`ApplyMassFromShapes`](/engine/6000.7/script-reference/unity/u2d/physics/physicsbody/applymassfromshapes.md.md) to recalculate after you add a shape. |
| **World Drawing**            | Draws the shape 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.md).                                                                                           |

### Mover Data

The properties in this section control how the area reacts to [`PhysicsWorld.CastMover`](/engine/6000.7/script-reference/unity/u2d/physics/physicsworld/castmover.md.md) geometry that collides with it.

| **Property**      | **Description**                                          |
| ----------------- | -------------------------------------------------------- |
| **Push Limit**    | Sets the amount the shape pushes against the geometry.   |
| **Clip Velocity** | Enables the shape clipping the velocity of the geometry. |

## Callbacks

| **Property**        | **Description**                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
| ------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Callback Source** | Sets the callback method the area calls when it makes contact with another area. The options are:**Off**: Calls no callbacks.**Area**: Calls the [`PhysicsAreaCallbacks.IContactCallback`](https://docs.unity3d.com/Packages/com.unity.2d.physics@latest?subfolder=/api/Unity.U2D.Physics.PhysicsAreaCallbacks.IContactCallback.html) or [`PhysicsAreaCallbacks.ITriggerCallback`](https://docs.unity3d.com/Packages/com.unity.2d.physics@latest?subfolder=/api/Unity.U2D.Physics.PhysicsAreaCallbacks.ITriggerCallback.html) method on the **Callback Target** object. Unity passes this method the Physics Area component that made contact.**Shapes**: Calls the [`PhysicsCallbacks.IContactCallback`](/engine/6000.7/script-reference/unity/u2d/physics/physicscallbacks/icontactcallback.md.md) or [`PhysicsCallbacks.ITriggerCallback`](/engine/6000.7/script-reference/unity/u2d/physics/physicscallbacks/itriggercallback.md.md) method on the **Callback Target** object. Unity passes this method the specific shape that made contact.**Events**: Calls a method or sets a parameter you select in the **On Contact Begin**, **On Contact End**, **On Trigger Begin**, or **On Trigger End** section.For more information, refer to [Collisions and interactions in 2D Physics Core](/engine/6000.7/manual/unity2d/2d-physics-api/interactions.md.md). |
| **Callback Target** | Sets the object that receives physics callbacks. This property is available only if you set **Callback Source** to **Area** or **Shapes**.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |
| **Areas Only**      | Calls callback methods only when the other shape also belongs to an area. Disable this property if you create shapes using the [`U2D.Physics`](/engine/6000.7/script-reference/unity/u2d/physics/physicsworld.md.md) API instead of a Physics Area component. This property is available only if you set **Callback Source** to **Area** or **Events**.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |

### Event settings

The properties in this section set the specific method this area calls or the parameter it sets when contact begins or ends. This section is available only if you set **Callback Source** to **Events**, and controls the behavior of one of the following methods of the component:

* `On Contact Begin (ContactBeginEvent)` and `On Contact End (ContactEndEvent)`, if **Is Trigger** is disabled.
* `On Trigger Begin (TriggerBeginEvent)` and `On Trigger End (TriggerEndEvent)`, If **Is Trigger** is enabled.

| **Property**       | **Description**                                                                                                                                                                                                                                                                                                                 |
| ------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Activation**     | Sets when the object activates the callback method or parameter. The options are:**Off**: Doesn't activate the callback method or parameter.**Editor and Runtime**: Activates the callback method or parameter in the Unity Editor and at runtime.**Runtime Only**: Activates the callback method or parameter only at runtime. |
| **Object**         | Sets the object with the parameter to update or method to call. 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 component. You can't directly edit the properties in this section.

### Callbacks

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

| **Property**      | **Description**                                                                                                                                                         |
| ----------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Contact Begin** | How many times a contact-begin callback was dispatched to a valid receiver this session. This property is visible only if the area's active definition isn't a trigger. |
| **Contact End**   | How many times a contact-end callback was dispatched to a valid receiver this session. This property is visible only if the area's active definition isn't a trigger.   |
| **Trigger Begin** | How many times a trigger-begin callback was dispatched to a valid receiver this session. This property is visible only if the area's active definition is a trigger.    |
| **Trigger End**   | How many times a trigger-end callback was dispatched to a valid receiver this session. This property is visible only if the area's active definition is a trigger.      |

### Other properties

| **Property**             | **Description**                                                                                                                                        |
| ------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------ |
| **Shape Count**          | The number of shapes in the sprite.                                                                                                                    |
| **Rejected Shape Count** | The number of shapes Unity can't use, for example because their points add unneeded extra points on a straight line, or are too close to other points. |

## Additional resources

* [Add physics to a GameObject with 2D Physics Core](/engine/6000.7/manual/unity2d/2d-physics-api/create-objects/physics-object.md)
* [Share properties across multiple 2D Physics Core components](/engine/6000.7/manual/unity2d/2d-physics-api/properties/definitions.md)
* [Configure global 2D Physics Core settings](/engine/6000.7/manual/unity2d/2d-physics-api/properties/class-physics-core-settings2d.md)
* [Add physics to a sprite with 2D Physics Core](/engine/6000.7/manual/unity2d/2d-physics-api/create-objects/add-sprite.md)
* [Merge 2D Physics Core shapes](/engine/6000.7/manual/unity2d/2d-physics-api/create-objects/connect-combine-shapes.md)
* [Physics Area Contour component reference](/engine/6000.7/manual/unity2d/2d-physics-api/create-objects/reference-area-contour.md)
