기술 자료

Unity Engine

Unity Engine

TestOverlapShapeProxy

Test if the provided shape proxy overlaps any shapes.
읽는 시간 1분최근 업데이트: 한 달 전

Definition

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

TestOverlapShapeProxy(ShapeProxy, QueryFilter)

Test if the provided shape proxy overlaps any shapes.
public bool TestOverlapShapeProxy(PhysicsShape.ShapeProxy shapeProxy, PhysicsQuery.QueryFilter filter)

Parameters

shapeProxy

The shape proxy to use. This must be in world-space.

The filter to control the result returned.

Returns

Type

Description

boolIf the query overlaps anything.

TestOverlapShapeProxy(ReadOnlySpan<ShapeProxy>, QueryFilter)

Test if the provided shape proxies overlaps any shapes.
public bool TestOverlapShapeProxy(ReadOnlySpan<PhysicsShape.ShapeProxy> shapeProxies, PhysicsQuery.QueryFilter filter)

Parameters

The shape proxy to use. This must be in world-space.

The filter to control the result returned.

Returns

Type

Description

boolIf the query overlaps anything.