Smooth 2D Random Movement

I just found a cool, really simple way to do smooth random movement. I’ve spent hours working on other, way more complicated ways to do this. Here’s how it works: the object has two angles which are rotated a random amount each frame. The object is pulled in the direction of each angle the same amount. The results is that, the more the angles align, the faster the object moves. Changes in direction are smooth because the angles can’t change abruptly. Maybe this is the oldest trick in the book, but it’s new to me and I love finding things like this!

Leave a comment

Your email address will not be published. Required fields are marked *


Your data is processed in accordance with my privacy policy. Comments are manually approved and may take a while to appear.