calculate distance x between two vector3 unity code example Example: unity distance between two vector3 Vector3.Distance(other.position, transform.position);