Skip to content

Instantly share code, notes, and snippets.

using UnityEngine;
public static class PhysicsDebugDraw
{
// Draws just the box at where it is currently hitting.
public static void DrawBoxCastOnHit(Vector3 origin, Vector3 halfExtents, Quaternion orientation, Vector3 direction, float hitInfoDistance, Color color)
{
origin = CastCenterOnCollision(origin, direction, hitInfoDistance);
DrawBox(origin, halfExtents, orientation, color);
}