Created
June 4, 2021 06:15
-
-
Save codorizzi/089c5826999450be2a7cd4d11f156b07 to your computer and use it in GitHub Desktop.
Rough draw spherecast debug code using lines
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 void DrawSphereCast(Vector3 origin, float radius, Color color, float duration = 0.1f) { | |
for(int x = -1; x < 2; x++) | |
for(int y = -1; y < 2; y++) | |
for (int z = -1; z < 2; z++) { | |
Vector3 end = origin + new Vector3(x, y, z) * radius; | |
Debug.DrawLine(origin, end, color, duration); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment