# PhysicsShape

> A shape is attached to a body and defines an area to which two distinct types of behaviour are handled: Collision: Contacts between shapes produce a collision response on their respective bodies, assuming their body type is Dynamic. Trigger: Contacts between shapes do not produce a collision response, only the fact that they're overlapping is reported. An unlimited number of shapes can be attached to a single body, known as a compound body. A shape is automatically destroyed when the body it is attached to is destroyed. A shape cannot exist unattached from a body.

## Definition

* **Type:** Struct
* **Namespace:** [Unity.U2D.Physics](/engine/6000.5/script-reference/unity/u2d/physics.md)
* **Assembly:** UnityEngine.PhysicsCore2DModule
* **Implements:** [IEquatable\<PhysicsShape>](https://learn.microsoft.com/dotnet/api/system.iequatable-1)

```csharp
public readonly struct PhysicsShape : IEquatable<PhysicsShape>
```

## Constructors

| Constructor                                                                                                             | Description                           |
| ----------------------------------------------------------------------------------------------------------------------- | ------------------------------------- |
| [PhysicsShape(Unity.U2D.Physics.PhysicsHandle)](/engine/6000.5/script-reference/unity/u2d/physics/physicsshape/ctor.md) | Create a shape from a physics handle. |

## Properties

| Property                                                                                                           | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
| ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [aabb](/engine/6000.5/script-reference/unity/u2d/physics/physicsshape/aabb.md)                                     | Get the world AABB that bounds this shape. The bounds of the shape is inflated slightly due to speculative collision detection. The inflation is smaller on Static shape types however it is not zero due to time-of-impact collision detection. If an exact AABB is required then you can retrieve that via the shape geometry. See [CircleGeometry.CalculateAABB](/engine/6000.5/script-reference/unity/u2d/physics/circlegeometry/calculateaabb.md), [CapsuleGeometry.CalculateAABB](/engine/6000.5/script-reference/unity/u2d/physics/capsulegeometry/calculateaabb.md), [PolygonGeometry.CalculateAABB](/engine/6000.5/script-reference/unity/u2d/physics/polygongeometry/calculateaabb.md) and [SegmentGeometry.CalculateAABB](/engine/6000.5/script-reference/unity/u2d/physics/segmentgeometry/calculateaabb.md). |
| [body](/engine/6000.5/script-reference/unity/u2d/physics/physicsshape/body.md)                                     | The body which the shape is attached to.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| [bounciness](/engine/6000.5/script-reference/unity/u2d/physics/physicsshape/bounciness.md)                         | The bounciness (coefficient of restitution) usually in the range \[0, 1]. Values higher than 1 will result in energy being added which can lead to an unstable simulation. This is assigned to the current \_surfaceMaterial.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |
| [bouncinessMixing](/engine/6000.5/script-reference/unity/u2d/physics/physicsshape/bouncinessmixing.md)             | Defines the method used when mixing the friction values of two shapes to form a contact. This is assigned to the current \_surfaceMaterial.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
| [bouncinessPriority](/engine/6000.5/script-reference/unity/u2d/physics/physicsshape/bouncinesspriority.md)         | The priority for combining the [\_bounciness](/engine/6000.5/script-reference/unity/u2d/physics/physicsshape/bounciness.md) properties when two shapes come into contact. If the priority of one shape is higher than the other shape then the higher priority [\_bouncinessMixing](/engine/6000.5/script-reference/unity/u2d/physics/physicsshape/surfacematerial/bouncinessmixing.md) will be used. If the priority of both shapes are the same then simply the higher enumeration value of [PhysicsMaterialCombine2D](/engine/6000.5/script-reference/unityengine/physicsmaterialcombine2d.md) from both shapes will be used. This is assigned to the current \_surfaceMaterial.                                                                                                                                       |
| [callbackTarget](/engine/6000.5/script-reference/unity/u2d/physics/physicsshape/callbacktarget.md)                 | Get/Set the [Object](/engine/6000.5/script-reference/unityengine/object.md) that callbacks for this shape will be sent to. Care should be taken with any [Object](/engine/6000.5/script-reference/unityengine/object.md) assigned as a callback target that isn't a [Object](/engine/6000.5/script-reference/unityengine/object.md) as this assignment will not in itself keep the object alive and can be garbage collected. To avoid this, you should have at least a single reference to the object in your code. To remove the object assigned here, set the callback target to NULL.                                                                                                                                                                                                                                 |
| [capsuleGeometry](/engine/6000.5/script-reference/unity/u2d/physics/physicsshape/capsulegeometry.md)               | Get/Set the Capsule associated with this shape. When getting the shape geometry, the shape type must match the geometry type otherwise a warning will be produced and invalid geometry will be returned. Setting the geometry will change the type of shape represented even if the shape type was different before. Setting the geometry will also result in waking the body the shape is attached to.                                                                                                                                                                                                                                                                                                                                                                                                                   |
| [chain](/engine/6000.5/script-reference/unity/u2d/physics/physicsshape/chain.md)                                   | Get the owning chain. The type of shape must be [PhysicsShape.ShapeType.ChainSegment](/engine/6000.5/script-reference/unity/u2d/physics/physicsshape/shapetype/chainsegment.md) otherwise a warning will be produced. See [\_isChainSegment](/engine/6000.5/script-reference/unity/u2d/physics/physicsshape/ischainsegment.md) and [PhysicsChain](/engine/6000.5/script-reference/unity/u2d/physics/physicschain.md).                                                                                                                                                                                                                                                                                                                                                                                                     |
| [chainSegmentGeometry](/engine/6000.5/script-reference/unity/u2d/physics/physicsshape/chainsegmentgeometry.md)     | Get/Set the Chain Segment associated with this shape. When getting the shape geometry, the shape type must match the geometry type otherwise a warning will be produced and invalid geometry will be returned. Setting the geometry will change the type of shape represented even if the shape type was different before. Setting the geometry will also result in waking the body the shape is attached to.                                                                                                                                                                                                                                                                                                                                                                                                             |
| [circleGeometry](/engine/6000.5/script-reference/unity/u2d/physics/physicsshape/circlegeometry.md)                 | Get/Set the Circle associated with this shape. When getting the shape geometry, the shape type must match the geometry type otherwise a warning will be produced and invalid geometry will be returned. Setting the geometry will change the type of shape represented even if the shape type was different before. Setting the geometry will result in waking the body the shape is attached to.                                                                                                                                                                                                                                                                                                                                                                                                                         |
| [contactEvents](/engine/6000.5/script-reference/unity/u2d/physics/physicsshape/contactevents.md)                   | Controls whether this shape produces contact events which can be retrieved after the simulation has completed. Any contact events can be used to call the assigned [\_callbackTarget](/engine/6000.5/script-reference/unity/u2d/physics/physicsshape/callbacktarget.md). A contact event is produced if either shapes involved have contactEvents enabled. A contact event will produce a [PhysicsCallbacks.IContactCallback](/engine/6000.5/script-reference/unity/u2d/physics/physicscallbacks/icontactcallback.md) to the [\_callbackTarget](/engine/6000.5/script-reference/unity/u2d/physics/physicsshape/callbacktarget.md) for both shapes involved.                                                                                                                                                               |
| [contactFilter](/engine/6000.5/script-reference/unity/u2d/physics/physicsshape/contactfilter-1.md)                 | The filter used when determining what contacts this shape participates in.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |
| [contactFilterCallbacks](/engine/6000.5/script-reference/unity/u2d/physics/physicsshape/contactfiltercallbacks.md) | Controls whether this shape produces contact filter callbacks. A contact filter callback allows direct control over whether a contact will be created between a pair of shapes. This applies to both triggers and non-triggers but only with to Dynamic bodies These are relatively expensive so disabling them can provide a significant performance benefit. A contact filter callback will call the [\_callbackTarget](/engine/6000.5/script-reference/unity/u2d/physics/physicsshape/callbacktarget.md) for both shapes involved if they implement [PhysicsCallbacks.IContactFilterCallback](/engine/6000.5/script-reference/unity/u2d/physics/physicscallbacks/icontactfiltercallback.md).                                                                                                                           |
| [customColor](/engine/6000.5/script-reference/unity/u2d/physics/physicsshape/customcolor.md)                       | Custom debug draw color. Any color value other than [\_clear](/engine/6000.5/script-reference/unityengine/color/clear.md) (RGBA=0) will be used to render the shape.. This value is passed back when using the [PhysicsWorld](/engine/6000.5/script-reference/unity/u2d/physics/physicsworld.md) drawing. The alpha value here is always ignored. This is assigned to the current \_surfaceMaterial.                                                                                                                                                                                                                                                                                                                                                                                                                      |
| [definition](/engine/6000.5/script-reference/unity/u2d/physics/physicsshape/definition.md)                         | Get/Set a shape definition by accessing all of its current properties. This is provided as convenience only and should not be used when performance is important as all the properties defined in the definition are accessed sequentially. You should try to only use the specific properties you need rather than using this feature.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
| [friction](/engine/6000.5/script-reference/unity/u2d/physics/physicsshape/friction.md)                             | The Coulomb (dry) friction coefficient, usually in the range \[0, 1]. This is assigned to the current \_surfaceMaterial.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| [frictionMixing](/engine/6000.5/script-reference/unity/u2d/physics/physicsshape/frictionmixing.md)                 | Defines the method used when mixing the friction values of two shapes to form a contact. This is assigned to the current \_surfaceMaterial.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
| [frictionPriority](/engine/6000.5/script-reference/unity/u2d/physics/physicsshape/frictionpriority.md)             | The priority for combining the [\_friction](/engine/6000.5/script-reference/unity/u2d/physics/physicsshape/friction.md) properties when two shapes come into contact. If the priority of one shape is higher than the other shape then the higher priority [\_frictionMixing](/engine/6000.5/script-reference/unity/u2d/physics/physicsshape/surfacematerial/frictionmixing.md) will be used. If the priority of both shapes are the same then simply the higher enumeration value of [PhysicsMaterialCombine2D](/engine/6000.5/script-reference/unityengine/physicsmaterialcombine2d.md) from both shapes will be used. This is assigned to the current \_surfaceMaterial.                                                                                                                                               |
| [hitEvents](/engine/6000.5/script-reference/unity/u2d/physics/physicsshape/hitevents.md)                           | Controls whether this shape produces hit events which can be retrieved after the simulation has completed.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |
| [isChainSegment](/engine/6000.5/script-reference/unity/u2d/physics/physicsshape/ischainsegment.md)                 | Check if the shape is a Chain type. A Chain type is owned by a chain. See [\_chain](/engine/6000.5/script-reference/unity/u2d/physics/physicsshape/chain.md) and [PhysicsChain](/engine/6000.5/script-reference/unity/u2d/physics/physicschain.md).                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
| [isOwned](/engine/6000.5/script-reference/unity/u2d/physics/physicsshape/isowned.md)                               | Get if the shape is owned. See [PhysicsShape.SetOwner](/engine/6000.5/script-reference/unity/u2d/physics/physicsshape/setowner.md).                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
| [isTrigger](/engine/6000.5/script-reference/unity/u2d/physics/physicsshape/istrigger.md)                           | Get/Set if the shape is a trigger. Changing the state here is relatively expensive and should be avoided. See [\_isTrigger](/engine/6000.5/script-reference/unity/u2d/physics/physicsshapedefinition/istrigger.md).                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
| [isValid](/engine/6000.5/script-reference/unity/u2d/physics/physicsshape/isvalid.md)                               | Check if the shape is valid.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| [localCenter](/engine/6000.5/script-reference/unity/u2d/physics/physicsshape/localcenter.md)                       | Get the center of the shape, in local-space.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| [massConfiguration](/engine/6000.5/script-reference/unity/u2d/physics/physicsshape/massconfiguration.md)           | The shape mass configuration. Normally this only used on a body where the total of all shapes is used. This allows the calculation of this specific shape in isolation. See [PhysicsBody.MassConfiguration](/engine/6000.5/script-reference/unity/u2d/physics/physicsbody/massconfiguration.md).                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
| [moverData](/engine/6000.5/script-reference/unity/u2d/physics/physicsshape/moverdata-1.md)                         | The mover data for the shape mover.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
| [ownerUserData](/engine/6000.5/script-reference/unity/u2d/physics/physicsshape/owneruserdata.md)                   | Get [PhysicsUserData](/engine/6000.5/script-reference/unity/u2d/physics/physicsuserdata.md) that can be used for any purpose, typically by the owner only.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |
| [physicsHandle](/engine/6000.5/script-reference/unity/u2d/physics/physicsshape/physicshandle.md)                   | Get the physics handle.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
| [polygonGeometry](/engine/6000.5/script-reference/unity/u2d/physics/physicsshape/polygongeometry.md)               | Get/Set the Polygon associated with this shape. When getting the shape geometry, the shape type must match the geometry type otherwise a warning will be produced and invalid geometry will be returned. Setting the geometry will change the type of shape represented even if the shape type was different before. Setting the geometry will also result in waking the body the shape is attached to.                                                                                                                                                                                                                                                                                                                                                                                                                   |
| [preSolveCallbacks](/engine/6000.5/script-reference/unity/u2d/physics/physicsshape/presolvecallbacks.md)           | Controls whether this shape produces pre-solve callbacks. This only applies to Dynamic bodies and is ignored for triggers. These are relatively expensive so disabling them can provide a significant performance benefit. A pre-solve callback will call the [\_callbackTarget](/engine/6000.5/script-reference/unity/u2d/physics/physicsshape/callbacktarget.md) for both shapes involved if they implement [PhysicsCallbacks.IPreSolveCallback](/engine/6000.5/script-reference/unity/u2d/physics/physicscallbacks/ipresolvecallback.md).                                                                                                                                                                                                                                                                              |
| [rollingResistance](/engine/6000.5/script-reference/unity/u2d/physics/physicsshape/rollingresistance.md)           | The rolling resistance usually in the range \[0, 1]. This is assigned to the current \_surfaceMaterial.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
| [segmentGeometry](/engine/6000.5/script-reference/unity/u2d/physics/physicsshape/segmentgeometry.md)               | Get/Set the Segment associated with this shape. When getting the shape geometry, the shape type must match the geometry type otherwise a warning will be produced and invalid geometry will be returned. Setting the geometry will change the type of shape represented even if the shape type was different before. Setting the geometry will also result in waking the body the shape is attached to.                                                                                                                                                                                                                                                                                                                                                                                                                   |
| [shapeType](/engine/6000.5/script-reference/unity/u2d/physics/physicsshape/shapetype-1.md)                         | The type of shape. See [PhysicsShape.ShapeType](/engine/6000.5/script-reference/unity/u2d/physics/physicsshape/shapetype.md).                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |
| [startMassUpdate](/engine/6000.5/script-reference/unity/u2d/physics/physicsshape/startmassupdate.md)               | Should the body update its mass properties when this shape is created. Disabling this improves performance when multiple shapes are being added to the same body. The mass of a body can then be explicitly updated by calling [PhysicsBody.ApplyMassFromShapes](/engine/6000.5/script-reference/unity/u2d/physics/physicsbody/applymassfromshapes.md)                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| [startStaticContacts](/engine/6000.5/script-reference/unity/u2d/physics/physicsshape/startstaticcontacts.md)       | Normally shapes on Static bodies don't create contacts when they are added to the world. This overrides that behavior and causes contact creation. This significantly slows down Static body creation which can be important when there are many Static shapes. This is implicitly always true for Triggers, Dynamic bodies and Kinematic bodies.                                                                                                                                                                                                                                                                                                                                                                                                                                                                         |
| [surfaceMaterial](/engine/6000.5/script-reference/unity/u2d/physics/physicsshape/surfacematerial-1.md)             | The surface material for the shape comprising of many properties such as friction, bounciness, rolling resistance etc. Setting the surface material overrides any individual settings for friction, bounciness, rolling resistance etc.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
| [tangentSpeed](/engine/6000.5/script-reference/unity/u2d/physics/physicsshape/tangentspeed.md)                     | The tangent (surface) speed. This is assigned to the current \_surfaceMaterial.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
| [transform](/engine/6000.5/script-reference/unity/u2d/physics/physicsshape/transform.md)                           | Get the shape transform. This is simply the body transform. See [\_transform](/engine/6000.5/script-reference/unity/u2d/physics/physicsbody/transform.md).                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |
| [triggerEvents](/engine/6000.5/script-reference/unity/u2d/physics/physicsshape/triggerevents.md)                   | Controls whether this shape produces triggers events which can be retrieved after the simulation has completed. A trigger event is only produced if both shapes involved have their triggerEvents enabled. A trigger event will produce a [PhysicsCallbacks.ITriggerCallback](/engine/6000.5/script-reference/unity/u2d/physics/physicscallbacks/itriggercallback.md) to the [\_callbackTarget](/engine/6000.5/script-reference/unity/u2d/physics/physicsshape/callbacktarget.md) for both shapes involved.                                                                                                                                                                                                                                                                                                               |
| [userData](/engine/6000.5/script-reference/unity/u2d/physics/physicsshape/userdata.md)                             | Get/Set [PhysicsUserData](/engine/6000.5/script-reference/unity/u2d/physics/physicsuserdata.md) that can be used for any purpose. The physics system doesn't use this data, it is entirely for custom use.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |
| [world](/engine/6000.5/script-reference/unity/u2d/physics/physicsshape/world.md)                                   | Get the world the shape is attached to.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
| [worldDrawing](/engine/6000.5/script-reference/unity/u2d/physics/physicsshape/worlddrawing.md)                     | Controls whether this shape is automatically drawn when the world is drawn.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |

## Methods

| Method                                                                                                           | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |
| ---------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [ApplyWind](/engine/6000.5/script-reference/unity/u2d/physics/physicsshape/applywind.md)                         | Apply a wind force to the shape body using the density of air This considers the projected area of the shape in the wind direction. This also considers the relative velocity of the shape. This only has an effect if the shape body is [RigidbodyType2D.Dynamic](/engine/6000.5/script-reference/unityengine/rigidbodytype2d/dynamic.md). This only has an effect of shapes of type Circle, Capsule or Polygon.                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
| [CastRay](/engine/6000.5/script-reference/unity/u2d/physics/physicsshape/castray.md)                             | Check if a ray intersects the shape. See [PhysicsQuery.CastResult](/engine/6000.5/script-reference/unity/u2d/physics/physicsquery/castresult.md).                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
| [CastShape](/engine/6000.5/script-reference/unity/u2d/physics/physicsshape/castshape.md)                         | Calculate if a cast shape intersects the shape. Initially touching shapes are treated as a miss. You should check for overlap first if initial overlap is required. See [PhysicsQuery.CastShapeInput](/engine/6000.5/script-reference/unity/u2d/physics/physicsquery/castshapeinput.md) and [PhysicsQuery.CastResult](/engine/6000.5/script-reference/unity/u2d/physics/physicsquery/castresult.md).                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |
| [ClosestPoint](/engine/6000.5/script-reference/unity/u2d/physics/physicsshape/closestpoint.md)                   | Calculate the closest point on this shape to the specified point.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
| [CreateShapeProxy](/engine/6000.5/script-reference/unity/u2d/physics/physicsshape/createshapeproxy.md)           | Create a shape proxy from the shape.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |
| [Destroy](/engine/6000.5/script-reference/unity/u2d/physics/physicsshape/destroy.md)                             | Destroy the shape, destroying all [PhysicsShape.Contact](/engine/6000.5/script-reference/unity/u2d/physics/physicsshape/contact.md) the shape is involved in. If the object is owned with [PhysicsShape.SetOwner](/engine/6000.5/script-reference/unity/u2d/physics/physicsshape/setowner.md) then you must provide the owner key it returned. Failing to do so will return a warning and the shape will not be destroyed. The lifetime of the specified owner object is not linked to this shape i.e. this shape will still be owned by the owner object, even if it is destroyed. Shapes of type Chain cannot be destroyed here, they must be destroyed by their owning chain. See [PhysicsChain](/engine/6000.5/script-reference/unity/u2d/physics/physicschain.md) and [PhysicsBody.MassConfiguration](/engine/6000.5/script-reference/unity/u2d/physics/physicsbody/massconfiguration.md). |
| [Distance](/engine/6000.5/script-reference/unity/u2d/physics/physicsshape/distance.md)                           | Get the minimum distance between this shape and the specified shape(s) span.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| [Draw](/engine/6000.5/script-reference/unity/u2d/physics/physicsshape/draw.md)                                   | Draw the PhysicsShape that visually represents its current state in the world.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| [GetContacts](/engine/6000.5/script-reference/unity/u2d/physics/physicsshape/getcontacts.md)                     | Get all the touching contacts this shape is currently participating in.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         |
| [GetDensity](/engine/6000.5/script-reference/unity/u2d/physics/physicsshape/getdensity.md)                       | Get the shape density. See \_massConfiguration.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
| [GetOwner](/engine/6000.5/script-reference/unity/u2d/physics/physicsshape/getowner.md)                           | Get the owner object associated with this shape as specified using [PhysicsShape.SetOwner](/engine/6000.5/script-reference/unity/u2d/physics/physicsshape/setowner.md).                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         |
| [GetPerimeter](/engine/6000.5/script-reference/unity/u2d/physics/physicsshape/getperimeter.md)                   | Get the length of the perimeter of the shape.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
| [GetPerimeterProjected](/engine/6000.5/script-reference/unity/u2d/physics/physicsshape/getperimeterprojected.md) | Get the length of the perimeter of the shape projected onto the specified axis.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
| [GetTriggerVisitors](/engine/6000.5/script-reference/unity/u2d/physics/physicsshape/gettriggervisitors.md)       | Get all the trigger visitors for this shape. The shape must be a trigger, if not, no visitors will be returned.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
| [Intersect](/engine/6000.5/script-reference/unity/u2d/physics/physicsshape/intersect.md)                         | Check the intersection between this shape and another shape.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| [OverlapPoint](/engine/6000.5/script-reference/unity/u2d/physics/physicsshape/overlappoint.md)                   | Check if a point intersects the shape. This will only work on "closed" shapes. See[PhysicsShape.ShapeType](/engine/6000.5/script-reference/unity/u2d/physics/physicsshape/shapetype.md).                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |
| [SetDensity](/engine/6000.5/script-reference/unity/u2d/physics/physicsshape/setdensity.md)                       | Set the shape density. See \_massConfiguration.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
| [SetOwner](/engine/6000.5/script-reference/unity/u2d/physics/physicsshape/setowner.md)                           | Set the owner object using the specified owner key. You can only set the owner once, multiple attempts will produce a warning. This call does not bind the lifetime of the specified owner object, it is simply a reference. It is also valid to not specify an owner object (NULL) to simply gain an owner key however it can be useful, if simply for debugging purposes and discovery, to know which object is the owner.                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| [SetOwnerUserData](/engine/6000.5/script-reference/unity/u2d/physics/physicsshape/setowneruserdata.md)           | Set [PhysicsUserData](/engine/6000.5/script-reference/unity/u2d/physics/physicsuserdata.md) that can be used for any purpose, typically by the owner only.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |

## Static Methods

| Method                                                                                                 | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
| ------------------------------------------------------------------------------------------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [CreateShape](/engine/6000.5/script-reference/unity/u2d/physics/physicsshape/createshape.md)           | Create a Capsule shape, using its default definition, attached to the specified body. See [PhysicsBody.CreateShape](/engine/6000.5/script-reference/unity/u2d/physics/physicsbody/createshape.md).                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
| [CreateShapeBatch](/engine/6000.5/script-reference/unity/u2d/physics/physicsshape/createshapebatch.md) | Create a batch of Capsule shapes attached to the specified body.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |
| [DestroyBatch](/engine/6000.5/script-reference/unity/u2d/physics/physicsshape/destroybatch.md)         | Destroy a batch of shapes, destroying all [PhysicsShape.Contact](/engine/6000.5/script-reference/unity/u2d/physics/physicsshape/contact.md) the shapes are involved in. Any invalid shapes will be ignored including chain segment shapes created via a [PhysicsChain](/engine/6000.5/script-reference/unity/u2d/physics/physicschain.md) (the chain must be destroyed)." Owned shapes will produce a warning and will not be destroyed (See [PhysicsShape.SetOwner](/engine/6000.5/script-reference/unity/u2d/physics/physicsshape/setowner.md)). See [PhysicsBody.MassConfiguration](/engine/6000.5/script-reference/unity/u2d/physics/physicsbody/massconfiguration.md). |
| [SetOwner](/engine/6000.5/script-reference/unity/u2d/physics/physicsshape/setowner.md)                 | Set the owner object using the specified owner key. You can only set the owner once, multiple attempts will produce a warning. This call does not bind the lifetime of the specified owner object, it is simply a reference. Whilst it is valid to not specify an owner object (NULL), it is recommended for debugging purposes.                                                                                                                                                                                                                                                                                                                                            |

## Structs

| Struct                                                                                                            | Description                                                                                                                                                                                                                                                                                                                  |
| ----------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [PhysicsShape.Contact](/engine/6000.5/script-reference/unity/u2d/physics/physicsshape/contact.md)                 | The contact between two shapes. By convention the manifold normal points from shape A to shape B. See [PhysicsBody.GetContacts](/engine/6000.5/script-reference/unity/u2d/physics/physicsbody/getcontacts.md) and [PhysicsShape.GetContacts](/engine/6000.5/script-reference/unity/u2d/physics/physicsshape/getcontacts.md). |
| [PhysicsShape.ContactFilter](/engine/6000.5/script-reference/unity/u2d/physics/physicsshape/contactfilter.md)     | A contact filter is used to control what contacts are created when intersecting other shapes. A contact filter contains a filter with the addition of a group index allowing overrides to the filter.                                                                                                                        |
| [PhysicsShape.ContactId](/engine/6000.5/script-reference/unity/u2d/physics/physicsshape/contactid.md)             | The unique Id of the contact. This contact is volatile and may be destroyed automatically when the world is modified or simulated therefore it should always be checked for validity.                                                                                                                                        |
| [PhysicsShape.ContactManifold](/engine/6000.5/script-reference/unity/u2d/physics/physicsshape/contactmanifold.md) | A contact manifold describes the contact points between colliding shapes. Speculative collision is used so some contact points may be separated, a property available per-contact.                                                                                                                                           |
| [PhysicsShape.MoverCollision](/engine/6000.5/script-reference/unity/u2d/physics/physicsshape/movercollision.md)   | Collision results optionally returned from [PhysicsWorld.CastMover](/engine/6000.5/script-reference/unity/u2d/physics/physicsworld/castmover.md) in [PhysicsQuery.WorldMoverResult](/engine/6000.5/script-reference/unity/u2d/physics/physicsquery/worldmoverresult.md).                                                     |
| [PhysicsShape.MoverData](/engine/6000.5/script-reference/unity/u2d/physics/physicsshape/moverdata.md)             | The mover data assigned to a \_moverData. This is used when [PhysicsShape](/engine/6000.5/script-reference/unity/u2d/physics/physicsshape.md) are encountered when using [PhysicsWorld.CastMover](/engine/6000.5/script-reference/unity/u2d/physics/physicsworld/castmover.md).                                              |
| [PhysicsShape.ShapeArray](/engine/6000.5/script-reference/unity/u2d/physics/physicsshape/shapearray.md)           | Fixed vertex shape array.                                                                                                                                                                                                                                                                                                    |
| [PhysicsShape.ShapeProxy](/engine/6000.5/script-reference/unity/u2d/physics/physicsshape/shapeproxy.md)           | A proxy of a shape in a generic form suited to representing all support shape types. You can provide between 1 and [PhysicsConstants.MaxPolygonVertices](/engine/6000.5/script-reference/unity/u2d/physics/physicsconstants/maxpolygonvertices.md)and a radius.                                                              |
| [PhysicsShape.SurfaceMaterial](/engine/6000.5/script-reference/unity/u2d/physics/physicsshape/surfacematerial.md) | Defines the dynamics of a surface on a shape.                                                                                                                                                                                                                                                                                |

## Enums

| Enum                                                                                                                            | Description                                                                                                                                                                                                                                                                                                                                                                         |
| ------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [PhysicsShape.ContactFilterGroupMode](/engine/6000.5/script-reference/unity/u2d/physics/physicsshape/contactfiltergroupmode.md) | The mode used to determine how [\_groupIndex](/engine/6000.5/script-reference/unity/u2d/physics/physicsshape/contactfilter/groupindex.md) is used.                                                                                                                                                                                                                                  |
| [PhysicsShape.ContactFilterMode](/engine/6000.5/script-reference/unity/u2d/physics/physicsshape/contactfiltermode.md)           | The mode used for the [PhysicsShape.ContactFilter](/engine/6000.5/script-reference/unity/u2d/physics/physicsshape/contactfilter.md) when determining if two [PhysicsShape](/engine/6000.5/script-reference/unity/u2d/physics/physicsshape.md) can contact. See [\_contactFilterMode](/engine/6000.5/script-reference/unity/u2d/physics/physicscoresettings2d/contactfiltermode.md). |
| [PhysicsShape.ShapeType](/engine/6000.5/script-reference/unity/u2d/physics/physicsshape/shapetype.md)                           | The type of shape. Some shapes are "closed" meaning they have an interior which will produce contacts. Some shapes are "open" meaning they do not have an interior and will only produce contacts when their boundary is intersected.                                                                                                                                               |
