# ChainSegmentGeometry

> The geometry of a chain line segment with one-sided collision which only collides on the "right" side. Several of these are generated for a chain, connected as ghost1 -\> point1 -\> point2 -\> ghost2.

## Definition

* **Type:** Struct
* **Namespace:** [UnityEngine.LowLevelPhysics2D](/engine/6000.3/script-reference/unityengine/lowlevelphysics2d.md)
* **Assembly:** UnityEngine.Physics2DModule

```csharp
public struct ChainSegmentGeometry
```

## Static Fields

| Value                                                                                                                    | Description                    |
| ------------------------------------------------------------------------------------------------------------------------ | ------------------------------ |
| [defaultGeometry](/engine/6000.3/script-reference/unityengine/lowlevelphysics2d/chainsegmentgeometry/defaultgeometry.md) | Get the default Chain Segment. |

## Constructors

| Constructor                                                                                                                                                                                                                                                       | Description                                                                                                                                                                       |
| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [ChainSegmentGeometry()](/engine/6000.3/script-reference/unityengine/lowlevelphysics2d/chainsegmentgeometry/ctor.md#chainsegmentgeometry\(\))                                                                                                                     | Create a default ChainSegment. See [ChainSegmentGeometry.defaultGeometry](/engine/6000.3/script-reference/unityengine/lowlevelphysics2d/chainsegmentgeometry/defaultgeometry.md). |
| [ChainSegmentGeometry(UnityEngine.LowLevelPhysics2D.SegmentGeometry,UnityEngine.Vector2,UnityEngine.Vector2)](/engine/6000.3/script-reference/unityengine/lowlevelphysics2d/chainsegmentgeometry/ctor.md#chainsegmentgeometry\(segmentgeometry-vector2-vector2\)) | Create a default ChainSegment.                                                                                                                                                    |

## Properties

| Property                                                                                                 | Description                                                                                                                                             |
| -------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [ghost1](/engine/6000.3/script-reference/unityengine/lowlevelphysics2d/chainsegmentgeometry/ghost1.md)   | The tail ghost vertex. A ghost vertex is used by the solver to define how a collision response should be handled when a contact with the vertex occurs. |
| [ghost2](/engine/6000.3/script-reference/unityengine/lowlevelphysics2d/chainsegmentgeometry/ghost2.md)   | The head ghost vertex A ghost vertex is used by the solver to define how a collision response should be handled when a contact with the vertex occurs.  |
| [isValid](/engine/6000.3/script-reference/unityengine/lowlevelphysics2d/chainsegmentgeometry/isvalid.md) | Check if the geometry is valid or not.                                                                                                                  |
| [segment](/engine/6000.3/script-reference/unityengine/lowlevelphysics2d/chainsegmentgeometry/segment.md) | The Segment.                                                                                                                                            |

## Methods

| Method                                                                                                                     | Description                                                                                                                                                                                                                                                                                                                                                                                                                     |
| -------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [CalculateAABB](/engine/6000.3/script-reference/unityengine/lowlevelphysics2d/chainsegmentgeometry/calculateaabb.md)       | Calculate the AABB of the geometry.                                                                                                                                                                                                                                                                                                                                                                                             |
| [CastRay](/engine/6000.3/script-reference/unityengine/lowlevelphysics2d/chainsegmentgeometry/castray.md)                   | Calculate if a world ray intersects the geometry. See [PhysicsQuery.CastResult](/engine/6000.3/script-reference/unityengine/lowlevelphysics2d/physicsquery/castresult.md).                                                                                                                                                                                                                                                      |
| [CastShape](/engine/6000.3/script-reference/unityengine/lowlevelphysics2d/chainsegmentgeometry/castshape.md)               | Calculate if a cast shape intersects the geometry. Initially touching shapes are treated as a miss. You should check for overlap first if initial overlap is required. See [PhysicsQuery.CastShapeInput](/engine/6000.3/script-reference/unityengine/lowlevelphysics2d/physicsquery/castshapeinput.md) and [PhysicsQuery.CastResult](/engine/6000.3/script-reference/unityengine/lowlevelphysics2d/physicsquery/castresult.md). |
| [ClosestPoint](/engine/6000.3/script-reference/unityengine/lowlevelphysics2d/chainsegmentgeometry/closestpoint.md)         | Calculate the closest point on this geometry to the specified point.                                                                                                                                                                                                                                                                                                                                                            |
| [InverseTransform](/engine/6000.3/script-reference/unityengine/lowlevelphysics2d/chainsegmentgeometry/inversetransform.md) | Inverse-Transform the geometry.                                                                                                                                                                                                                                                                                                                                                                                                 |
| [Transform](/engine/6000.3/script-reference/unityengine/lowlevelphysics2d/chainsegmentgeometry/transform.md)               | Transform the geometry.                                                                                                                                                                                                                                                                                                                                                                                                         |
