Can See Target

NodeCanvas Forums Support Can See Target

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #16032
    drewofdonuts
    Participant

    Hello,

    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?

    Any help would be appreciated – thank you!

    Attachments:
    You must be logged in to view attached files.
    #16036
    Gavalakis
    Keymaster

    Hello,

    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. 🙂

    Thank you!

    Join us on Discord: https://discord.gg/97q2Rjh

    Attachments:
    You must be logged in to view attached files.
    #16044
    drewofdonuts
    Participant

    Hello!

    Thank you for the clarification. I did import the fix and unfortunately it is still not working. Any thoughts?

     

    #16056
    Gavalakis
    Keymaster

    Hello again,

    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

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.