playMaker

Author Topic: Basic pathfinding workflow.  (Read 1935 times)

escooler

  • Playmaker Newbie
  • *
  • Posts: 11
Basic pathfinding workflow.
« on: September 18, 2015, 02:32:53 PM »
Hi There,

I posed a about this yesterday, but I thought a more concise question after a few days experimentation might yield some better results. I downloaded the pathfinding actions found in the wiki https://hutonggames.fogbugz.com/default.asp?W1174, but I cannot find any documentation on the forum of how to implement the actions in a basic form.

Say i want a point and click controller that can dodge obstacles set up via a NavMesh. What series of actions would i need to take.

Would I use; calculate path (tween my agent and mouse click using 'Nav Mesh Calculate Path) does this get stored anywhere? - then move to a new FSM where I use the Set agent path or Set destination (not quite sure on the terminology), or move to (am use not sure really). 

I found some old examples in the forums, but they seemed more complex than I could really decode, and did not seem to offer a more directly interacting structure.

Super sorry, this is probably some of the more taxing stuff I have had to face since I started using playmaker a few months ago. 


mdotstrange

  • Hero Member
  • *****
  • Posts: 555
    • Can't code? Who cares! Make games anyway!
Re: Basic pathfinding workflow.
« Reply #1 on: September 18, 2015, 06:00:43 PM »
The navmesh system is pretty simple once you know what to focus on-

- Generate a navmesh
- Add a navmesh agent to your character
- Use the "Set destination as game object" action on your character (action might be on Ecosystem)

Now your character will move to the destination- then it is just about giving them destinations dynamically through using a game object variable as destination- you can also use "Set agent destination" and give it a vector 3 variable

For a point and click game I would assume you would use an action to get the vector3 for where the user clicked than set that as a destination

If you want to know more I just released a tutorial course where I set up basic enemy ai using the navmesh system with Playmaker + much more here http://thestrangeschool.com
Indie game dev and instructor at the Strange School. Learn Playmaker at the Strange School!

escooler

  • Playmaker Newbie
  • *
  • Posts: 11
Re: Basic pathfinding workflow.
« Reply #2 on: September 19, 2015, 09:00:59 AM »
Oh Wow, thanks,

thats wayyyyy simpler than I thought. Managed to get a working version now. Just move le destination around. Think I can work everything out from that now.

Adam