Method CastCollider
CastCollider(in ColliderAspect, float3, float, QueryInteraction)
Cast the collider aspect against this IAspectQueryable.
Declaration
bool CastCollider(in ColliderAspect colliderAspect, float3 direction, float maxDistance, QueryInteraction queryInteraction = QueryInteraction.Default)
Parameters
Type | Name | Description |
---|---|---|
ColliderAspect | colliderAspect | The collider aspect. |
float3 | direction | The direction of the aspect. |
float | maxDistance | The maximum distance. |
QueryInteraction | queryInteraction | (Optional) The query interaction. |
Returns
Type | Description |
---|---|
bool | True if there is a hit, false otherwise. |
CastCollider(in ColliderAspect, float3, float, out ColliderCastHit, QueryInteraction)
Cast the collider aspect against this IAspectQueryable.
Declaration
bool CastCollider(in ColliderAspect colliderAspect, float3 direction, float maxDistance, out ColliderCastHit closestHit, QueryInteraction queryInteraction = QueryInteraction.Default)
Parameters
Type | Name | Description |
---|---|---|
ColliderAspect | colliderAspect | The collider aspect. |
float3 | direction | The direction of the aspect. |
float | maxDistance | The maximum distance. |
ColliderCastHit | closestHit | [out] The closest hit. |
QueryInteraction | queryInteraction | (Optional) The query interaction. |
Returns
Type | Description |
---|---|
bool | True if there is a hit, false otherwise. |
CastCollider(in ColliderAspect, float3, float, ref NativeList<ColliderCastHit>, QueryInteraction)
Cast the collider aspect against this IAspectQueryable.
Declaration
bool CastCollider(in ColliderAspect colliderAspect, float3 direction, float maxDistance, ref NativeList<ColliderCastHit> allHits, QueryInteraction queryInteraction = QueryInteraction.Default)
Parameters
Type | Name | Description |
---|---|---|
ColliderAspect | colliderAspect | The collider aspect. |
float3 | direction | The direction of the aspect. |
float | maxDistance | The maximum distance. |
NativeList<ColliderCastHit> | allHits | [in,out] all hits. |
QueryInteraction | queryInteraction | (Optional) The query interaction. |
Returns
Type | Description |
---|---|
bool | True if there is a hit, false otherwise. |
CastCollider<T>(in ColliderAspect, float3, float, ref T, QueryInteraction)
Cast the collider aspect against this IAspectQueryable.
Declaration
bool CastCollider<T>(in ColliderAspect colliderAspect, float3 direction, float maxDistance, ref T collector, QueryInteraction queryInteraction = QueryInteraction.Default) where T : struct, ICollector<ColliderCastHit>
Parameters
Type | Name | Description |
---|---|---|
ColliderAspect | colliderAspect | The collider aspect. |
float3 | direction | The direction of the aspect. |
float | maxDistance | The maximum distance. |
T | collector | [in,out] The collector. |
QueryInteraction | queryInteraction | (Optional) The query interaction. |
Returns
Type | Description |
---|---|
bool | True if there is a hit, false otherwise. |
Type Parameters
Name | Description |
---|---|
T | Generic type parameter. |