Constant speed pathfinding

My project has player and non-player characters moving forward at a constant speed, and you can only control the direction by rotating. I was thinking of using A*pathfinding on the non-player characters, but is it possible with constant speed? characters should never stop to rotate etc… how should I start implementing it?

Thanks,

  • Janne

Hi

This is a significant kinematic constraint and it is unfortunately not possible to achieve this without large changes to the pathfinding algorithm. The best you can do with a regular pathfinding algorithm is to path as usual but then try to post-process the path to insert smooth turns and bends (see e.g. “Postprocessing for High-Quality Turns” - chapter 2.11 in the book AI Game Programming Wisdom 4).