Pathfinding stops before his last node

0 favourites
  • 6 posts
From the Asset Store
Node Downloader is a plugin for download file for Construct 3 and construct 2 game engine
  • Hey guys ! The pathfinding behavior is driving me nuts

    I have a grid of 16*16 and i would like to have a 16*16 sprite with the pathfinding behavior to get right into the grid when it moves to his last node.

    I've tried a LOT of things but it seems that everytime the pathfinding stops randomly before it attains the last node.

    Imagine a chess game where each piece needs to be put precisely in the middle of the grid.

    Am i doing something wrong ? I couldn't make this work in the pathfinding demo either.. Or is it the way the pathfinding in C2 is coded ?

    Cheers !

  • I came across this myself. I solved it by recalculating the path when it stops. It looks like there is only a limited number of nodes that it can keep track off.

  • Ah thanks man ! I will try something like that, but i have to admit it's most annoying

    Apparentely it's not the number of nodes ( i store waypoints in an array and can have a lot of nodes for a sprite ) Those nodes in the middle are working perfectly it's just at the last one that the sprite doesn't want to get on, it's weird

  • Yeah that is what I meant by nodes sorry. In my case it wasn't the last one but it did only like 3 quarters of the path.

  • Well no luck on working out a solution, that sucks

    The sprite is making circles around the position i'd like to put it in Thanks for the help dude

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Have you considered to reduce the size of the grid. Maybe that is why it is going in circles.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)