Distance(PhysicsShape, bool)
Get the minimum distance between all the shapes attached to this body and the specified shape.
Read time 1 minuteLast updated 10 days ago
Definition
- Type: Method
- Namespace: Unity.U2D.Physics
- Assembly: UnityEngine.PhysicsCore2DModule
public PhysicsQuery.DistanceResult Distance(PhysicsShape physicsShape, bool useRadii = true)
Parameters
The shape to check the distance of.
Whether to use the radii of all shapes or not.
Returns
Type | Description |
|---|---|
| DistanceResult | The distance result. |