Pathfinding considering face direction

Hello,

I try figure out how i can get path which onsidering face direction of seeker, for example in base if I have a seeker who have face direction at top(north) and point behind him (somwhere at south) pathfinding find a direct way, will rotate seeker at start point and move him (pic 1)
pic1

But i need something like on pic2:
pic2

It’s possible with using A* project? (i think yes) And maybe you could help me by some code or algorith or
indicate the direction of the search?

I’m using pro version and grid graph.

Thanks you.

Hi

Doing pathfinding that take the direction into consideration is not possible with this system (doing that requires some changes to the internal algorithms, it’s not impossible to do, but a bit fiddly). It is right now not possible to use post processing to get that behaviour either, but I am working on a script to do that (based on how Company of Heroes does it), but that might not be available for a while.
So I suggest that you try to do it by using a steering behaviour. When the vehicle needs to move as in your picture 1, then the movement script would make it turn with maximum angular velocity to the right, but still move forwards. That will make it move along a circle until it faces the target. There is of course the possibility that this will make the vehicle drive right into a wall, so you would have to do some raycasting to check for walls and if those are encountered either rotate in place, or if you are feeling ambitious, do some kind of 3 point turn.

Hello,

Thanks a lot for answering, yes, I thinking about add aditional points to search, like 1 more to right(or left, based on target point) and then using something, like Bezier functions, because i more need draw correct way like on picture 2 and then moving, no only moving =) I hope you show us this script, which you working, asap :wink:

+1 for this feature. I need to have units that sidestep or back-step while facing the player, so such a script would be greatly appreciated. Any progress, Aron?