hello,
in my game i have a setup in wich the ai must take a look around him and check wich gameobject is the nearest.
so i registered all distances in an array, but now, i don't know if there is a better way to compare each value and take the smallest, (and i'm pretty sure there is one) ?
cause for now i'm making multiple loops and set différents steps (<10, <20, <30...) but doing this way may takes ages for me but also to calculate.