Hello. How can I have an object move automatically from point A to point B, but take a random route? Thanks.
It's a triple question in one sentence. Pretty impressive.
1: Moving Objects 2: Randomizing paramaters 3: Following waypoints
1: Use character controller Move, Physical Force, or changing the transform values or using a method in the transform class 1 , 2
2: This is how you make a random value
3: I have no idea how to do this in Unity or if there is a support system for it. My best guess would be setting up a container with Vector3 values such as an array or list.
This is a suggested approach.
Create some Vector3's using 3 random values per Vector. Make a fixed amount of vectors Store them in an array or other datatype for containment.
Write a method for sorting everything over a set of axes in which you can pick any Vector with random value as long as it's values are closes to the target position than the current position. And if the vector is not a correct one to pick , remove it from the options list/container for the next move and pick again.