check radius unity code example
Example: unity how to check if a game object if with in a radius
if (Vector3.Distance (Object1.transform.position, Object2.transform.position) < 100)
{
//Do something because the distance is less than 100
}
if (Vector3.Distance (Object1.transform.position, Object2.transform.position) < 100)
{
//Do something because the distance is less than 100
}