New day, new question…
How can I find the smallest of multiple variables, without resorting to writing a BubbleSort (or similar) algorithm myself? I would need it for Pathfinding (find the shortest path to a given point while being constrained to just move in distinct directions), so it should be as fast s possible.
I found Mathf.Min in the script reference, but I do not need the value itself, but the variable that this value is assigned to. Would I need to compare each variable to that value, or is there a better way of doing this?
Thank you. It definitely looks like it should work. I'll try and implement it and get back.
– PiflikJupp. I can confirm it does work. Many thanks for the help.
– Piflik