bool Smart_Intersection(float cowPathDistance, PathHandler comp_path) { if (cowPathDistance > currentDifficulty.smartness_leadDistance) { temp3V2 = comp_path.GetRoutePosition(currentDifficulty.smartness_leadDistance); temp3V2.z = 0.0f; // distance/speed = ETA // if you can intersect if (currentDifficulty.smartness_leadDistance / targetCow.movement_speed < Vector2.Distance((Vector2)temp3V2, (Vector2)transform.position) / currentDifficulty.movement_speed) { // target intersection point SmartMove_IntersectionPoint = temp3V2; return(true); } else { return(false); } } else { return(false); } }