Quantcast
Channel: Unity Forum
Viewing all articles
Browse latest Browse all 1466670

Return spawn point when out of range

$
0
0
Hi guys i hv this beginig ai script and it works perfectly i just wonder how can i change it to when i go out out enemy range it return to initial position and not stay in position when it stop follow me...

thats the script...

ty

Code (CSharp):
  1. using UnityEngine;
  2. using System.Collections;
  3.  
  4. public class EnemyAI : MonoBehaviour
  5. {
  6.     float distance;
  7.     float lookAtDistance = 25.0f;
  8.     float attackRange = 15.0f;
  9.     float moveSpeed = 5.0f;
  10.     float damping = 6.0f;
  11.  
  12.     public Transform target;...
Return spawn point when out of range

Viewing all articles
Browse latest Browse all 1466670

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>