Npc navigating offmesh links.

RickC

New member
Hello,

I'm fairly new using Behavior Designer and I am not a coder, I use Unity with Playmaker. I could not find a lot of information for the npc to traverse offmesh links with vaulting and jumping animations. I'm just starting to learn how to use Behavior Designer but I don't see anything in the tasks addressing offmesh links. My guess is that I will have to involve Playmaker with Behavior Designer. Can anyone get me going in the right direction?

Thanks

Rick C
 

Justin

Administrator
Staff member
The recommended way to approach this is to have your character controller handle the off mesh links rather than Behavior Designer. This will allow your tree to stay focused on the overall AI flow rather than the verbose details such as character movement. Using Playmaker is a great solution for being your character controller, though I'm not sure if it can work with off mesh links. If it can't then I don't think there is a way other than something that involves code.
 

RickC

New member
The recommended way to approach this is to have your character controller handle the off mesh links rather than Behavior Designer. This will allow your tree to stay focused on the overall AI flow rather than the verbose details such as character movement. Using Playmaker is a great solution for being your character controller, though I'm not sure if it can work with off mesh links. If it can't then I don't think there is a way other than something that involves code.
Hello Justin, thanks for the reply. Yes Playmaker handles just about everything for me so far. My Player character and the npc I am working on right
now use playmaker FSMs. My npc can already use the offmesh links to climb and jump. I thought it would be easier to expand the AI with Behavior Designer. In a simple scenario, the player climbs an obstacle, the npc follows to the closest offmesh link. I would have to figure out how Behavior Designer will sense that the npc needs to traverse an offmesh link and activate the climbing or jumping FSM and when finished the FSM returns
control to Behavior Designer. Like I said before I am new to Behavior Designer. What collision detection is available in Behavior Designer?
 

Justin

Administrator
Staff member
To Behavior Designer it shouldn't matter if the character is on an offmesh link or not. All that it should care about is whether or not the character is currently moving to a new position using something like the seek task. Your FSM which acts as the character controller will always be active while the behavior tree is active.

You can use OnTrigger/OnCollision callbacks in Behavior Designer - just make sure the task is being reevaluated using conditional aborts so it can detect that the trigger or collision occurred.
 
Top