Transform
Transform the specified geometry.
Read time 1 minuteLast updated 10 days ago
Definition
- Type: Method
- Namespace: Unity.U2D.Physics
- Assembly: UnityEngine.PhysicsCore2DModule
Transform(PhysicsTransform)
Transform the specified geometry.
public readonly PolygonGeometry Transform(PhysicsTransform transform)
Parameters
The transform used to specify where the geometry is positioned.
Returns
Type | Description |
|---|---|
| PolygonGeometry | The transformed geometry. |
Transform(Matrix4x4, bool)
Transform the specified geometry. The maximum absolute value component from the scale will be used to scale the _radius.
public readonly PolygonGeometry Transform(Matrix4x4 transform, bool scaleRadius)
Parameters
Returns
Type | Description |
|---|---|
| PolygonGeometry | The transformed geometry. |
Transform(Span<PolygonGeometry>, PhysicsTransform)
Transform a batch of geometry in place. A transform that degenerates the geometry hull writes an invalid (zero-vertex) polygon in its place.
public static void Transform(Span<PolygonGeometry> geometry, PhysicsTransform transform)
Parameters
The geometry to transform in place.
The transform to apply.
Transform(Span<PolygonGeometry>, Matrix4x4, bool)
Transform a batch of geometry in place. The maximum absolute value component from the scale will be used to scale each _radius. A transform that degenerates the geometry hull writes an invalid (zero-vertex) polygon in its place.
public static void Transform(Span<PolygonGeometry> geometry, Matrix4x4 transform, bool scaleRadius)
Parameters
The geometry to transform in place.
The transform to apply.
Whether to scale the radius of the shape.