Documentation

Unity Engine

Unity Engine

PolygonAndSegment(PolygonGeometry, PhysicsTransform, SegmentGeometry, PhysicsTransform)

Check the intersection between Polygon and Segment geometries.
Read time 1 minuteLast updated 9 hours ago

Definition

  • Type: Method
  • Namespace: Unity.U2D.Physics
  • Assembly: UnityEngine.PhysicsCore2DModule
public static PhysicsShape.ContactManifold PolygonAndSegment(PolygonGeometry geometryA, PhysicsTransform transformA, SegmentGeometry geometryB, PhysicsTransform transformB)

Parameters

The first geometry to use.

The transform used to specify where the first geometry is positioned.

The second geometry to use.

The transform used to specify where the second geometry is positioned.

Returns

Type

Description

ContactManifoldThe contact manifold fully detailing the intersection. Its normal points from the first geometry to the second, and its points are listed in the same order.