- Home /
This question was
closed Oct 20, 2013 at 09:37 AM by
vexe for the following reason:
Too subjective and argumentative
Question by
vipirak · Feb 21, 2012 at 01:15 AM ·
pathfinding
Random Roaming around
hi, i need some stuff to move around randomly, picking their own path and such, any idea how to do that? (C# please)
Comment
Best Answer
Answer by milali · Feb 21, 2012 at 10:41 PM
Use a pathfinding solution that already exists all are either free or cheap. make your waypoints, pick a random waypoint or make an array of objects and select one of those randomly and get the pathfinding to navigate to it.
done.
Answer by Berenger · Feb 21, 2012 at 10:36 PM
To chose a random destination : Random.insideUnitSphere * radius;
To go there if no obstacle, characterController.SimpleMove, else AngryAnt's or AronGranberg's pathfinding.