Simple AI bot Sidescroller

So… I was trying to make an AI character that didn’t need locating his routes or waypoints, he doesn’t need to interp his movement, he just walks forward, and if he hits a wall, he just goes on the other way, simple as that.

just think of it like a mario goomba, always forward, hits something, goes back, hits ledge, just falls.

At least I thought so…
I can’t figure out a way to reverse his movement, and I can’t figure how to make him recognize EVERY object without having to make every object “generate collision/hit events”… I thought about having “if his speed becomes 0, then reverse”, but I can’t figure out how to do it… can someone help please?

you could store and check his position in an Tick Event to detect the lack of movement

BTW why would you not want to have collision enabled? If he has no collision with it, it’s correct to walk through it anyway??

To make your AI simply walk, use a “add movement input” with world direction set to x1y0z0 (if you want it to walk on the X axis) and the scale set to 1.
You can use a “get velocity” with a “vector length” and check if the result is smaller or equal to 0 at every tick. If yes, rotate your character (or set on “Orient rotation to movement” in the character movement component) and just change the scale input of the “add movement input” node to -1 to walk backward.

Ok I solved the problem by my own right now, it ended looking up a lot like a goomba simple AI so I can iterate further.

Yeah I was trying with add movement input, but 4.9 was bugging out too much and I tried that on 4.10 and now it worked lol, its just a simple character that walks forward until it bumps into a wall (gets 0 speed), and he turns around and goes on his way. The delay is there so he has time to think of his rotation before starting to convulse beside a wall. And , I didn’t say I “didn’t want collision enabled”, I said I didn’t want to enable events on every object, I meant hit events. He was not walking through anything, he just can’t recognize a hit event or an overlap without you having to generate hit events on every ■■■■■■■ object in the world.

I’ll post a picture of the results so people who look for this might find my answer in the future.

Thanks guys.