A* Pathfinding Navigation - Character Road Movement

Hi All,

I have been using the various functions of the Pathfinding project in preperation for a system I am trying to build for an RTS game.

The game will be a ‘road’ based game and characters will navigate on the road only. I have decided to use the Waypoint system and I am able to have a character move from one point to the target.

However, I am now trying to programme my character to walk straight and turn left at the next available opportunity.

Grateful for any advice on how I can set this up. I would like to simply instruct the character object to keep walking straight and then turn left everytime it reaches a left junction/road.

I have spent a few days trying to come up with a few ideas and would be grateful for any suggestions.

Thank you in advance for any guidance/assistance - it is much appreciated.

Kind Regards

Felix

Is there a way that I could check whether there is a node on the character’s left before it proceeds to the node in front of it?

Hi

I am sorry to say that the system does not have very good support for these kinds of more complex behaviours.
It is possible to create one way links, which might solve your problem, but anything more complex than that cannot be handled well, it is better handled by more specialised pathfinding systems.

I would like to simply instruct the character object to keep walking straight and then turn left everytime it reaches a left junction/road.
...if the character just turns left, how is the character supposed to get to the target (the character might have to turn right for example). If you just want this behaviour (always turning left, not doing any pathfinding) then you are not really looking for pathfinding, but you are looking for a FSM system or something similar.
1 Like