[SOLVED]Small collision problem. Linecast

I have a bounding box on my object and i would like to use it to check if my attack radius intercepts the bounding box.

for example in the Platformer Tut the code is:

if (Vector3.Distance(enemy.transform.position, pos) < punchRadius)

but this doesn’t work for my wide objects as tranform position is the center

Is there a way to say

if (punchRadius.Intercepts(enemy.BoundingBox)

Thanks![/code]

Yeah, use a Linecast, check it out here:

that will return a structure called raycastHit which includes all sorts of data including distance from origin to the collider (bounding box). Check it here:

Thank you very much!