On the below thread you will see a random walk algorythm which may help and some great suggestions from scraggle
to improve works best if your working in a gid style environment. There's also some great function by blink0k on same page
ideally one of the most effective terrain followers I found was by chafari thats on the forum somewhere
https://forum.thegamecreators.com/thread/222027?page=3
This thread uses a cheat style approach from the movement of cars originally which i placed invisible objects to the left and right in from of a car
it worked for the car dynamics but maybe not what you might be looking for.
https://forum.thegamecreators.com/thread/223651
Good luck and have a great Christmas
fubarpk
https://fubarpk.itch.io/