I swear I’m on the brink of a breakthrough!
details here:
Thank you! ~
I swear I’m on the brink of a breakthrough!
details here:
Thank you! ~
Confusing to read another thread to respond …
Anyhow, I would imagine that you could try the indexOf the transform.
GameObject wpOBJ = FindNearestWaypoint();
currentWPIndex = System.Array.IndexOf(waypoints,wpOBJ.transform);
Does that work for ya?
Side note: If you kept a stored list of way points (or a copy of them), you could use a sort comparer on the array when needed (or even your Linq method), and not have to use ‘Find’. =)