Strict Orthoganal Movement

I have checked other topics but can’t really find a solution thus far.

I have my movement (4 connections, grid based graph) working like this:

move1b

It does work properly on a straight line but when it comes to an opening, it cuts the corner diagonally (smoothly).

I would like for it to move like this:

move2b

Would anyone have any ideas how I should adjust to achieve this?

I am using the Follower Entity and the aidestinationsetter if that helps.

Thanks so much for any help that could be provided!

This came up in a thread before and Aron suggested using the Manhattan Heuristics option:

Thank you. I did see this and tried Manhattan but that didn’t seem to make a difference. I am not scripting my own ai path rather, I am using the built in setup. I am not quite sure how I can make use of this?

Hi

I would suggest using the AILerp movement script instead. Take a look at its documentation page for how to configure it for this kind of movement:

image

Hey awesome, so I have this setup now. How do I get it to follow a transform (my Player)? Kindly forgive my very basic knowledge at this point.

When I added the AILerp, it also added a script called seeker. I have setup as it said in the documentation for strict movement along connections.

That’s the AIDestinationSetter component. Same as the other movement scripts.

Ha! That worked perfectly! Thank you so very much!