—
You are welcome!
An important note is that maybe there are best ways to achieve similar results. So, you can mess with the code and improve it!
What I did here is setting a random X and Y location every random amount of time. This location is stored in the two variables and is based on the window size, so the footsteps will never get lost beyond the screen.
The amount of time you can configure to fit better your project.
Another important thing is know exactly what you want when the random time is reached and a new location is setted.
In this case, I wanted that the footsteps turn slowly to the location.
So, in addition to being always moving forward, the footsteps will, with the lerp action, always turn to the specified X and Y in the screen.
Edit: Oh, I forgot.. the new location is setted when the timer reaches it's limit, but when the distance between the actual location and the footsteps is less than 30 too. This way, the footsteps will never be stopped.
Made sense! Thank you very much!