Pathfinding movement direction

HayManMarc

Member
Is there a way to restrict the movement direction of an object during pathfinding?

When I set up an object using pathfinding, it will set it's direction at any angle it needs. I'd like to restrict it to 30 degree increments, and I can't figure out how to do it. I've tried simply manipulating the 'direction' variable, but it doesn't work.

I've tried using mp_potential_settings, but that doesn't seem to work with grid-based pathfinding.

Any thoughts and ideas (especially solutions - lol) are appreciated!
 
Last edited:

NightFrost

Member
You'd need to implement your own version of a* if you wanted to restrict pathfinding only to nodes within certain angle of current heading, and track heading as part of the path data. Having said that; turn rate implies a certain degree of freedom of movement, and lockstepping it to a grid hopping destroys that. (You are restricting it to 45 degree turns across step lengths equal to distance between grid centers.)
 
Top