Earlier today, I made a tutorial about Steering Behaviors:
Using the Seek Steering Behavior and some algorithms, I simulated the Wander Steering Behavior. The red circle is the one moving in random directions. The white circle ahead of it is the radius of the targets. Targets are chosen only in this radius. The mover seeks these targets. The cyan circle on the border of the white circle locates the direction of the steering. These components are only for better visualization :)
To keep the circle in the canvas I adjusted its position, though we can use the Evade Steering behavior for the same.
If you are interested in more, check out: 2D Mechanics and Physics stuff
I hope you like these posts, see ya later!