# 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:** [Unity.U2D.Physics](/engine/6000.6/script-reference/unity/u2d/physics.md)
* **Assembly:** UnityEngine.PhysicsCore2DModule

```csharp
public struct ChainSegmentGeometry
```

## Static Fields

| Value                                                                                                        | Description                    |
| ------------------------------------------------------------------------------------------------------------ | ------------------------------ |
| [defaultGeometry](/engine/6000.6/script-reference/unity/u2d/physics/chainsegmentgeometry/defaultgeometry.md) | Get the default Chain Segment. |

## Constructors

| Constructor                                                                                                                                                                                                                               | Description                                                                                                                                        |
| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------- |
| [ChainSegmentGeometry()](/engine/6000.6/script-reference/unity/u2d/physics/chainsegmentgeometry/ctor.md#chainsegmentgeometry\(\))                                                                                                         | Create a default ChainSegment. See [\_defaultGeometry](/engine/6000.6/script-reference/unity/u2d/physics/chainsegmentgeometry/defaultgeometry.md). |
| [ChainSegmentGeometry(Unity.U2D.Physics.SegmentGeometry,UnityEngine.Vector2,UnityEngine.Vector2)](/engine/6000.6/script-reference/unity/u2d/physics/chainsegmentgeometry/ctor.md#chainsegmentgeometry\(segmentgeometry-vector2-vector2\)) | Create a default ChainSegment.                                                                                                                     |

## Properties

| Property                                                                                     | Description                                                                                                                                             |
| -------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [ghost1](/engine/6000.6/script-reference/unity/u2d/physics/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.6/script-reference/unity/u2d/physics/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.6/script-reference/unity/u2d/physics/chainsegmentgeometry/isvalid.md) | Check if the geometry is valid or not.                                                                                                                  |
| [segment](/engine/6000.6/script-reference/unity/u2d/physics/chainsegmentgeometry/segment.md) | The Segment.                                                                                                                                            |

## Methods

| Method                                                                                                         | Description                                                                                                                                                                                                                                                                                                                                                                                             |
| -------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [CalculateAABB](/engine/6000.6/script-reference/unity/u2d/physics/chainsegmentgeometry/calculateaabb.md)       | Calculate the AABB of the geometry.                                                                                                                                                                                                                                                                                                                                                                     |
| [CastRay](/engine/6000.6/script-reference/unity/u2d/physics/chainsegmentgeometry/castray.md)                   | Calculate if a world ray intersects the geometry. See [PhysicsQuery.CastResult](/engine/6000.6/script-reference/unity/u2d/physics/physicsquery/castresult.md).                                                                                                                                                                                                                                          |
| [CastShape](/engine/6000.6/script-reference/unity/u2d/physics/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.6/script-reference/unity/u2d/physics/physicsquery/castshapeinput.md) and [PhysicsQuery.CastResult](/engine/6000.6/script-reference/unity/u2d/physics/physicsquery/castresult.md). |
| [ClosestPoint](/engine/6000.6/script-reference/unity/u2d/physics/chainsegmentgeometry/closestpoint.md)         | Calculate the closest point on this geometry to the specified point.                                                                                                                                                                                                                                                                                                                                    |
| [CreateShapeProxy](/engine/6000.6/script-reference/unity/u2d/physics/chainsegmentgeometry/createshapeproxy.md) | Create a shape proxy from the geometry.                                                                                                                                                                                                                                                                                                                                                                 |
| [InverseTransform](/engine/6000.6/script-reference/unity/u2d/physics/chainsegmentgeometry/inversetransform.md) | Inverse-Transform the geometry.                                                                                                                                                                                                                                                                                                                                                                         |
| [Transform](/engine/6000.6/script-reference/unity/u2d/physics/chainsegmentgeometry/transform.md)               | Transform the geometry.                                                                                                                                                                                                                                                                                                                                                                                 |

## Static Methods

| Method                                                                                                         | Description                                                                                                                                                                                                                                                                                                           |
| -------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [CreateSegments](/engine/6000.6/script-reference/unity/u2d/physics/chainsegmentgeometry/createsegments.md)     | Create multiple [ChainSegmentGeometry](/engine/6000.6/script-reference/unity/u2d/physics/chainsegmentgeometry.md) from a set of vertices. The rules for interpreting the specified vertices when creating segments is described in [PhysicsChain](/engine/6000.6/script-reference/unity/u2d/physics/physicschain.md). |
| [InverseTransform](/engine/6000.6/script-reference/unity/u2d/physics/chainsegmentgeometry/inversetransform.md) | Inverse-Transform a batch of geometry in place.                                                                                                                                                                                                                                                                       |
| [Transform](/engine/6000.6/script-reference/unity/u2d/physics/chainsegmentgeometry/transform.md)               | Transform a batch of geometry in place.                                                                                                                                                                                                                                                                               |
