기술 자료

Unity Engine

Unity Engine

Distance(PhysicsShape, bool)

Get the minimum distance between all the shapes attached to this body and the specified shape.
읽는 시간 1분최근 업데이트: 한 달 전

Definition

  • Type: Method
  • Namespace: Unity.U2D.Physics
  • Assembly: UnityEngine.PhysicsCore2DModule
public PhysicsQuery.DistanceResult Distance(PhysicsShape physicsShape, bool useRadii = true)

Parameters

physicsShape

The shape to check the distance of.

useRadii

Whether to use the radii of all shapes or not.

Returns

Type

Description

DistanceResultThe distance result.