Hey gang I’m trying to understand SphereCast
(I have my ships fly around my map, and when you enter their sphere cast they attack you
if of course your not already being attacked. (prevent clumping act)
Was wondering how to do (If hit) with sphere cast?
//------------------------------------------------------------------------------------------------
if (Target == null) {
Physics.SphereCast (new Vector3 (0, 0, 0), 2.0f, Vector3.forward, hit2, 300);
Target = hit2.collider.gameObject; // How Do I do If hit?
}
//------------------------------------------------------------------------------------------------