Forum rules - please read before posting.

Pathfinding in ONLY eight directions

edited March 21 in Technical Q&A


First off, I want to thank Chris for the quick responses in my earlier questions regarding inventory and conversation behaviour. They didn't went unnoticed and were of huge help.

New question:

My game's type is standard old-fashioned point & click with a mouse and 2d graphics all the way.

I struggled to make my 8-direction walk animations work smoothly and noticed it was partly due to my character sliding on his path when finding the position to walk to. I've illustrated this problem in the image below (the first one; "Default").

In the default mode, if the path to walk is slightly askew (with respect to the camera perspective), the animation may be "Walk_R" all the way the way from the start to the end. This can cause some sliding effect when character goes further from the camera while walking right.

I was wondering; is it possible to somehow make the character walk - find paths - only in eight directions (illustrated in the Alt 1 and Alt 2 pictures)? As I was typing this I realized the 3d-space/camera workflow may cause some hardships with this idea.

(An easy way to understand this is how characters move in games made with RPGMaker; they can normally walk in only 4 directions.)


  • This is something I've looked into the past, but it's admittedly a far more complex task than I'm afraid I'm capable of.

    Generating a path in isolation that handles only 8 directions is difficult enough on its own, but the issue of camera space you mention indeed makes it even harder.

    It is, however, possible to implement a custom pathfinding system by subclassing the NavigationEngine class - which is something each of the three provided algorthims (PolygonCollider, MeshCollider and UnityNavigation) do. If someone were able to find a way forward with this algorithm, it could be hooked into AC as a custom script.

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Welcome to the official forum for Adventure Creator.
Do NOT follow this link or you will be banned from the site!