In my 2d game I could use go thru an array of obects and use distance_to and get the closest enemy marble easily enough.
In 3d I don't really understand the reaction.
nearest_marble.transform.origin.distance_to(transform.origin) < 2.5:
When I print this terminal- for most of my pathfollow it gives one number counting down as it gets closer- but then it appears to give me 2 numbers. One within my range and a 2nd above my range. Which causes issues.
Could some explain how 3d distance_to works or the easiest way I can get closest enemy?