Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


Transform

Transform the geometry.
Read time 1 minuteLast updated 6 days ago

Definition

  • Type: Method
  • Namespace: Unity.U2D.Physics
  • Assembly: UnityEngine.PhysicsCore2DModule

Transform(PhysicsTransform)

Transform the geometry.
public readonly CapsuleGeometry Transform(PhysicsTransform transform)

Parameters

The geometry to transform with.

Returns

Type

Description

CapsuleGeometryThe transformed geometry.

Transform(Matrix4x4, bool)

Transform the geometry. The maximum absolute value component from the scale will be used to scale the _radius.
public readonly CapsuleGeometry Transform(Matrix4x4 transform, bool scaleRadius)

Parameters

transform

The transform to be used on the geometry.

scaleRadius

Whether to scale the radius of the shape.

Returns

Type

Description

CapsuleGeometryThe transformed geometry.

Transform(Span<CapsuleGeometry>, PhysicsTransform)

Transform a batch of geometry in place.
public static void Transform(Span<CapsuleGeometry> geometry, PhysicsTransform transform)

Parameters

The geometry to transform in place.

The transform to apply.

Transform(Span<CapsuleGeometry>, Matrix4x4, bool)

Transform a batch of geometry in place. The maximum absolute value component from the scale will be used to scale the _radius.
public static void Transform(Span<CapsuleGeometry> geometry, Matrix4x4 transform, bool scaleRadius)

Parameters

The geometry to transform in place.

transform

The transform to apply.

scaleRadius

Whether to scale the radius of the shape.