How to easy make waypoints (dynamic - in game)?

Hello!
I will have few bots in my game. They will have simple route beetween waypoints (I have a table for each of them). I’m using Empty Objects as waypoints and NavMeshAgent (Unity Free) to navigate. And where is the problem? I want to randomize it a bit and after constant period of time each bot will change route for a new one. I will randomize numbser and create few points in predefinied radius. How should I instantiate objects? I don’t have flat terrain!

I was thinking about makind height as max height of my terrain and add Rigidbody with gravitation to each component. Do you know better trick?

And btw: there is an option for easy placing object on the ground? It’s a bit frustrating when I’m placing empty objects (or with gizmos) and missed a few yards placing them into the air or below my terrain texture.

A* Pathfinding Project is imao by far the best (free) pathfinding solution. Check that out, it is good documented as well.

I tested this a bit see if this gets ya there,note I forgot to add the nav logic, but works randomly for ya.

Might be a good starting place:

script name: botExample_kuro.cs

using UnityEngine;
using System.Collections;

public class botExample_kuro : MonoBehaviour {

	public Transform[] waypoint;//collection of waypoints a bot will choose from.
	public bool[] waitOrNot;//if marked true, then the bot will wait the delay time amount.
	[Range (0f, 50f)]
	public float patrolSpeed = 3.0f;
	[Range (0f, 10f)]
	public float waypointDelayTime = 3.0f;//amount of time a bot will wait at the waypoint before continuing on.
	private float wayPointDistance = 0.0f;//distance to next waypoint.
	public float waypointThreshold = 5f;//distance bot will trigger either the wait event or move on to the next waypoint immediately.
	public Transform theChosenWaypoint = null;
	private bool patroling = false;

	// Use this for initialization
	void Start () {

		patroling = false;
		Invoke ("DecideState",.01f);
	
	}

	void Update () {

		if (theChosenWaypoint!= null){
		
			wayPointDistance = (theChosenWaypoint.position - this.transform.position).magnitude;

		}
		
		if (patroling == true && wayPointDistance > waypointThreshold && theChosenWaypoint!= null){

			this.transform.LookAt(theChosenWaypoint); 
			this.transform.Translate(patrolSpeed * Vector3.forward * Time.deltaTime);
			
		}
		
		else if(patroling == true && wayPointDistance <= waypointThreshold && theChosenWaypoint!= null){

			for(int t = 0; t < waypoint.Length; t++){
				
				if(theChosenWaypoint == waypoint[t] && waitOrNot[t] == true){

					patroling = false;
					Invoke ("DecideState",waypointDelayTime);
					
				}
				
				else if(theChosenWaypoint == waypoint[t] && waitOrNot[t] == false){

					patroling = false;
					Invoke ("DecideState",.01f);
					
				}
				
			}
			
		}
		
	}

	// Decide State, deciding what to do.
	void DecideState () {

		patroling = false;

		theChosenWaypoint = waypoint[(Random.Range (0,waypoint.Length))];

		if(waypoint != null){

			Invoke ("PatrolState",.01f);

		}

		else if(waypoint == null){
			
			Debug.Log("Your waypoint Array is empty.");
			
		}
		
	}

	// Patrol State, going where need be.
	void PatrolState () {

		patroling = true;
	
	}
}