Smart Pathfinding 8 directions following

I would like to request some diagonal movement ability for this plugin: http://forums.rpgmakerweb.com/index.php?/topic/46761-smart-pathfinding/

While the player is able to move in 8 directions, if you want, events sadly always follow just 4 directions, which is a detour for them. Even in move route commands the move towards player function always uses just 4 directions, so a parameter/extra plugin, which would be able to let events even use 8 directions so that they can use shortcuts, would be great.  🙂  

Just a suggestion. 

Thanks!
Any plugin that implements diagonal pathfinding will automatically be compatible with that one 🙂

I added diagonal pathfinding on my "faster pathfinding" plugin, but then removed it before releasing, because it wasn't good enough. Don't remember what the problem was, but I may look at it again at some point.
Sounds good. Thanks!  🙂
bump_by_shiroiakumasama-d9sk422.png
This plugin seems to use the default RM MV pathfind check (used for mouse movement), so it would probably work with this: 





EDIT: tested here and it's not totally compatible, but it's not hard to have them both working.


On the end of the plugin replace this:


      if (direction > 0)
      {
        this.moveStraight(direction);
      }


with this:

Code:
      if (direction > 0) {
		if (direction % 2 !== 0) {
			this._diagonal = direction;
			this.diagonalMovement(direction);
			if (this.needDiagonalFix()) this.diagonalMovementFix(direction);
		} else {
			this._diagonal = 0;
			this.moveStraight(direction);
		};
      }
Thank you very much, I will try and give feedback (edit this post) if it works 🙂  


Yes it works! I owe you. <3
This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.

Original thread: https://forums.rpgmakerweb.com/threads/smart-pathfinding-8-directions-following.51995/