Are there any dependencies for Can See Target condition to work (in the same Colliders are needed for some Tasks)? I am unable to get this task to work. Just to test, I used “Target Within Distance” as a test, checking for the same variable as “Can See Target”, and that was successful.
Bonus question: What is the difference between “Max Distance” in relation to “Awareness Distance”? I’m assuming Awareness Distance is what the target has to be within to be true…so not really sure what the point of Max Distance is?
The Max Distance is “The distance within which to look out for”.
The AwarenessDistance is “The distance within which the target can be seen or rather sensed regardless of view angle.”
With that said, there is a bug in CanSeeTarget regarding Awareness Distance, which I have just fixed and which could be the problem for your first question as well. I have attached the fixed files for you here. Please let me know if things work out as expected now and if the difference between Max Distance and Awareness Distance makes sense now. 🙂
Hmm. There are no other dependencies. The code basically checks the distance, the view angle, and also makes a physics raycast to check if anything is in the way between the agent and the target to see. Maybe in your case the raycast is the problem and it hits something that shouldnt (like the floor)? If this is the case, then I will have to add an offset to make possible to change the raycast origin instead of it being the position of the agent transform (which in most cases it at the feet of a character).
Let me know if the above is indeed the case for you.
Thank you!
Join us on Discord: https://discord.gg/97q2Rjh
Author
Posts
Viewing 4 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic.
Login
Register
By registering on this website you agree to our Privacy Policy.