ドキュメント

Unity Engine

Unity Engine

TestOverlapAABB

Tests if the provided AABB potentially overlaps any shapes. The overlap is between AABB of shapes in the world therefore it may not result in an exact overlap of any shape itself. See PhysicsAABB and PhysicsQuery.QueryFilter.
読み終わるまでの所要時間 1 分最終更新 1ヶ月前

Definition

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

TestOverlapAABB(PhysicsAABB, QueryFilter)

Tests if the provided AABB potentially overlaps any shapes. The overlap is between AABB of shapes in the world therefore it may not result in an exact overlap of any shape itself. See PhysicsAABB and PhysicsQuery.QueryFilter.
public bool TestOverlapAABB(PhysicsAABB aabb, PhysicsQuery.QueryFilter filter)

Parameters

The AABB used to check overlap. This must be in world-space.

The filter to control the result returned.

Returns

Type

Description

boolIf the query overlaps anything.

TestOverlapAABB(ReadOnlySpan<PhysicsAABB>, QueryFilter)

Tests if the provided AABBs potentially overlap any shapes. The overlap is between AABB of shapes in the world therefore it may not result in an exact overlap of any shape itself. See PhysicsAABB and PhysicsQuery.QueryFilter.
public bool TestOverlapAABB(ReadOnlySpan<PhysicsAABB> aabbs, PhysicsQuery.QueryFilter filter)

Parameters

The AABB used to check overlap. These must be in world-space.

The filter to control the result returned.

Returns

Type

Description

boolIf the query overlaps anything.