Simple back and forth Ai movement

I’ve been trying for a couple of days and I can’t seem to figure out how to make an enemy going from left to right to left to right to left… I’m trying to make a top down style game.

You basically need to indicate the “patrol” points and have AI go to one and then to another. The simplest possible setup could be this:

Cheers,

–mieszko

Is there something special you did to your pawn before, because I did the exact same thing and i cant seem to get any movement out of it. :frowning:

This works out of the box for Character-derived classes. Bare-bone Pawn misses some ingredients. Is that the case here, you’re using a plain Pawn?

It’s not something we support really. I mean you can pull this off, but there’s not out-of-the box thing that gives you just that. Try using a Pawn class with FloatingPawnMovement attached to it, this should work (provided you’re using 4.7.x)

Yea exactly. At the moment there is no character involved. You could say I’m trying to apply the patpatroling behaviour to a mesh in a pawn class.

I see we are getting closer x) is there any documentation on how to use the FloatingPawnMovement node?

Ok, but where do I connect it? (By the way thank you for answering my questions so far)

It’s not a node, it’s a component. You need to add it to your pawn’s blueprint, or create a pawn blueprint first if you’re currently using plain pawn.

You shouldn’t need to connect it - making your pawn have one should be enough.

There’s plenty of tutorials showing how to add a component. Please look at those.

Can you give me some examples, I can’t seem to grasp how to set it up :confused:

Finally figured it out, in the end I was only missing a navigation volume Thanks again for your help