Why are Physics.OverlapBox and DrawWireCube different sizes?

These two calls are seamingly of different sizes:

Collider[] items = Physics.OverlapBox(endPoint.position, overlapBoxScale, Quaternion.identity, itemLayerMask);

and

Gizmos.DrawWireCube(endPoint.position, overlapBoxScale);

I am seeing the wireframe fine but I can see that items on the itemlayer although intersecting with it fine they are doing so at odd positions, slightly larger than the drawwirecube. Wondering if ayone else has had this issue.

OverlapBox is a method that comes from the Nvidia PhysX system. It expects half the size of the cube. “DrawWireCube” on the other hand expects the size of the whole cube. So if you want to draw the area of effect you should do:

Gizmos.DrawWireCube(endPoint.position, overlapBoxScale * 2f);

Hey, @SteenPetersen I am having this same issue right now… did you ever figure it out? ,Hey I am having this same issue right now… did you ever figure it out?

https://stackoverflow.com/questions/44312223/unity-physics-overlapbox-just-doesnt-work/45995231#45995231?newreg=da779d4bca7a41068dcc4354b8de28e9

The part with Mathf.Abs helped me maybe it will help u to