2D random movement

I am a beginner, but I am learning… I am trying to make a ball move randomly on X and Y.

Basically looking down into a box, I have a ball in there, and I want it to bounce around on its own.

I tried getting my motion from an event tick driven add movement, which will make it move in a set direction. I tried a random vector unit to randomize the direction, but as your probably aware, it changes direction every tick and basically goes in a small area.

If I could change direction less often or change to a new random direction on hiting a wall… either of these would work, but I cant seem to make it happen.

Any tips or suggestions would be greatly appreciated.

I don’t know a lot of thing about 2D component, I think a solution will be to enable physic and make the rebounce colision higher. unfortunotaly I can’t help you more than this.

You goal seems to be an actor AI controlled, you want it to move by its own, right? im linking my EQS tree, might be a little overwhelming if you are a total beginner, but the concept is easy to grab. epic has a good tutorial explaning the basics. Setting Up Advanced AI | Live Training | Unreal Engine - YouTube

this AI is very simple, but you need to understand the basic about EQS…it evaluates the surroundings, rate them and go for the best matching result (higher score if you set so). using tests, you can prioritize the points infront of the AI so it doesnt randomly runs back and forward…once it reaches a wall, if you add a minimum range, it will stop and start picking other points.

feel free to ask anything if you dont understand my screenshot.

Thanks for the responses… I am going to spend a chunk of my day learning this. I try to spend 2-3 hours a day learning UE. This seems as good of a topic for my day as any other… Thank you