T O P

  • By -

Migui2611

As a concept, using the pathfinding: Instead of guiding the actor to the final destination create an empty object which I will call "Goal", and other empty object which I will call "FinalGoal". The FinalGoal will be the final destination, but it won't be the destination that the actor will go to. The actor will go always to Goal as it's destination. Everytime the actor reaches the Goal, the Goal will teleport closer to the final goal but instead of a straight line, it will have a random offset generated by code and always on avaliable terrain. I prefer using goals, instead of directly using the pathfinding system as it gives me more control. Never done it in Godot, tho.


mistermashu

One way to do this is by using smooth noise for example Godot's [OpenSimplexNoise](https://docs.godotengine.org/en/stable/classes/class_opensimplexnoise.html) So for example, when you are making your line, offset each point sideways based on a noise value you get from the noise generator. Then the noise generator gives you a bunch of handy values to tweak to get the result you want.