TestOverlapPoint
Tests if the provided point overlaps any shapes. See PhysicsQuery.QueryFilter.
Read time 1 minuteLast updated 10 days ago
Definition
- Type: Method
- Namespace: Unity.U2D.Physics
- Assembly: UnityEngine.PhysicsCore2DModule
TestOverlapPoint(Vector2, QueryFilter)
Tests if the provided point overlaps any shapes. See PhysicsQuery.QueryFilter.
public bool TestOverlapPoint(Vector2 point, PhysicsQuery.QueryFilter filter)
Parameters
The point used to check overlap. This must be in world-space.
The filter to control the result returned.
Returns
Type | Description |
|---|---|
| bool | If the query overlaps anything. |
TestOverlapPoint(ReadOnlySpan<Vector2>, QueryFilter)
Tests if the provided point(s) overlap any shapes. See PhysicsQuery.QueryFilter.
public bool TestOverlapPoint(ReadOnlySpan<Vector2> points, PhysicsQuery.QueryFilter filter)
Parameters
The points used to check overlap. These must be in world-space.
The filter to control the result returned.
Returns
Type | Description |
|---|---|
| bool | If the query overlaps anything. |