Example #1
0
 // Update is called once per frame
 void Update()
 {
     navAgentFacingDirection = navAgent.GetFacingDirection();
     if (navAgentFacingDirection != cachedDirection)
     {
         cachedDirection   = navAgentFacingDirection;
         transform.forward = -cachedDirection;
     }
 }