Answers for "unity how to check if a game object if with in a radius"

C#
1

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
 }
Posted by: Guest on September-23-2020

Code answers related to "unity how to check if a game object if with in a radius"

C# Answers by Framework

Browse Popular Code Answers by Language