This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static class Tools | |
{ | |
public static RaycastHit[] SuperSphereCastAll(Vector3 startPos, float radius, Vector3 direction, [DefaultValue("Mathf.Infinity")] float distance = float.PositiveInfinity, [DefaultValue("DefaultRaycastLayers")] int layerMask = -5, [DefaultValue("QueryTriggerInteraction.UseGlobal")] | |
QueryTriggerInteraction queryTriggerInteraction = QueryTriggerInteraction.UseGlobal) | |
{ | |
RaycastHit[] rayCastResults = Physics.SphereCastAll(startPos, radius, direction, distance, layerMask, queryTriggerInteraction); | |
for (int index = 0; index < rayCastResults.Length; index++) | |
{ | |
RaycastHit hit = rayCastResults[index]; |