How can I make a Pawn/Enemy Patrol Left to Right (Side Scroller)?

I discovered NavMeshes and am able to move my Pawn/Enemy.
But… I have move in Radius all around the nag mesh area.

I only wish for the Enemy to do simple movement from Left to Right, then Back from Right to Left.
Any ideas on how to set Y values for a Pawn.

Thanks

You could put info actors in the level that your bot will search for, and move back and forth between. I’ve done that in a side scroller before, for simple back and forth movement. It’s easier to use something you can place and move about in the level to set the destination points than to hard-code positions in.

For the logic, I am using the Behavior Tree system that is built in. Because it’s not documented yet, unless your already familiar with Behavior Trees in general you may want to wait on using that until they complete the documentation. So, you could just put that behavior in the tick function of the controller, moving to one point then the next. Off the BeginPlay event you would do an Actor search and either get the info actors your using as destination points by tag, or just search for the two closest to the enemy and use those two, setting their locations to location variables in the controller.

This is just an idea, there are obviously many ways you can do this.

Hi DreamBotStudios,

We have not heard back from you in a few days, so we are marking this post as Resolved for tracking purposes. If you are still experiencing the issue you reported, please respond to this message with additional information and we will offer further assistance.

Thank you.