title: Why the enemy is positioned at this place ? And why the rotation speed never change?
body: <pre><code>using UnityEngine;
  using System.Collections;
  
  public class WaypointsMover : MonoBehaviour {
  
      public float rotateSpeed = 2.0f;
  
      private bool rotating;
  
      void Update() {
          StartCoroutine(TurnTowards(-transform.forward));
      }
  
      IEnumerator TurnTowards(Vector3 lookAtTarget) {    
  
          if(rotating == false) {
              Quaternion newRotation = Quaternion.LookRotation(lookAtTarget - transform.position);
              newRotation.x = 0;
              newRotation.z = 0;
  
              for (float u = 0.0f; u &lt;= 10.0f; u += Time.deltaTime * rotateSpeed) {
                  rotating = true;
                  transform.rotation = Quaternion.Slerp(transform.rotation, newRotation, u);
  
                  yield return null;
              }
              rotating = false;
          }
      }
  
      // Use this for initialization
      void Start () {
  
      }
  }
  </code></pre>
  
  <ol>
  <li><p>No matter if i change the value of rotateSpeed to 10.0f or to 20.0f the enemy will get to one side will walk some on place and then will turn and walk to the other side. How can i make that the enemy will turn right away when getting to the side ?</p></li>
  <li><p>Why the enemies positioned there on the building roof while in the scene i position them in another places at all ?</p></li>
  <li><p>How do i set waypoints ? I can't find in the code way points. I know that in the for loop it was in the original:</p>
  
  <p>for (float u = 0.0f; u &lt;= 1.0f; u += Time.deltaTime * rotateSpeed) {</p></li>
  </ol>
  
  <p>I changed it to 10.0f instead of 1.0f so now they are walking longer way on the roof. But if i want to make that they will go between two spheres i have ?</p>
  
  <p>This is a screenshot of the scene the building on the right where they walk on it's roof when running the game. The two enemies(Guards) on the left on the right it's the Main Player. The camera i set it to follow the first Guard.</p>
  
  <p>I also noticed there is not space between them so they collide each other or disturb each other to walk. Where or how can i set more space between them so each one will go on it's own path ?</p>
  
  <p><a href="https://i.stack.imgur.com/KwNYV.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/KwNYV.jpg" alt="Scene"></a></p>
  
  <p>This is a short video clip i recorded showing how they are walking and where they are walking:</p>
  
  <p><a href="https://youtu.be/maoClrqqTMc" rel="nofollow noreferrer">Video Clip</a></p>