Calculate route/path of a ball using Raycast

I want to create waypoints once i press a button. I want to shoot a ray, which can bounce off walls and once it hit the wall it instantiate a gameobject as waypoint on hit.

What i have so far:

void Update () 
		Ray ray = new Ray (transform.position, transform.forward);
		RaycastHit hit;

		Debug.DrawLine(ray.origin, transform.forward,;

		if (Physics.Raycast (ray, out hit, rayLength, WallLayer)) 
			Vector3 reflectdir = Vector3.Reflect(ray.direction,hit.normal);
			ray = new Ray(hit.point, reflectdir);// is this the right way?

			Debug.DrawLine(ray.origin, hit.point,;

			if(hit.collider.gameObject.tag == "wall")

				Instantiate(WayPoint, hit.point, Quaternion.identity); //everytime the ray hits the wall create one

Any Ideas?

@OctoMan HEY did you get the solution to this problem ? Even i was looking for this .