Forums › 💬 NodeCanvas › ⚙️ Support › BUG: Target In Line Of Sight 2D
Hi, I noticed that the optional Save Distance As variable is never getting set in the script so it is never available in the graph.
I added this to the OnCheck() function to fix locally: saveDistanceAs.value = Vector2.Distance(LOSTarget.value.transform.position, agent.position);
saveDistanceAs.value = Vector2.Distance(LOSTarget.value.transform.position, agent.position);
Hello. Thank you, that was an omission 🙂 I will make the change too for the next update.