Regardig the docs: Unity - Scripting API: Physics.BoxCast
the parameter halfExtents is a vector3 with HALF the size of the boxcast in each dimension…
And in the example says:
m_HitDetect = Physics.BoxCast(center, transform.localScale, transform.forward, out m_Hit, transform.rotation, m_MaxDistance);
But after that, the draw gizmo example we see in the same page they do:
Gizmos.DrawWireCube(transform.position + transform.forward * dist, transform.localScale);
So my question… isn’t the boxCast or the Gizmo draw missing a division by 2?
The boxcast expects half of the size… but then the Gizmo is drawing the full size,
To my understanding the Gizmo would be drawing a box twice as big as the BoxCast actually is casting.