navmesh which offmesh link needs turning on
i am working on a game, where enemy char attempting to follow hero char. hero may have deactivate off mesh links in the way. Q is when enemy reaches near jump(off mesh link - deactivated) . does agent nav mesh has any function which gives me back offmesh link name, which needs to be turned on so character can reach target ? i hope it make sense or i can put a diagram explaining problem, if that can help.
Answer by FortisVenaliter · Jun 09, 2016 at 04:15 PM
No, if it's disabled, it can't be used. Why would an enemy want to use a link that can't be used? Or, if it can be used by the enemy, why is it disabled?
All off mesh links are deactivated at start so no other agents (like hero character) can use them. I know it should be activated at the time of jump. That is why I want to know the name of Offmesh link which needs to be turning on.
Example, Enemy present at platform A. Target is on platform B. Suppose there is an offmesh link named "LinkAB" (deactivated) . Enemy starts walking towards platform B but stop at the edge of platform A because offmesh link is deactivated. At this moment I want to know the name of offmesh link. I mean is there any way agent tells me that which offmesh link is deactivate between its target and in this case returns "LinkAB".
I still don't understand why it's deactivated to begin with. You mention it's so the hero character can't use them, but then how would they get into a situation where the enemy needs to use them to get to the hero? Normally, you leave them all enabled unless something in the environment is physically blocking them.