示例#1
0
 void Movement()
 {
     v                   = ((transform.position - enemyTarget.position) * maxVelocity).normalized;
     force               = v - CurrentVelocity;
     CurrentVelocity    += force * Time.deltaTime;
     transform.position += CurrentVelocity * Time.deltaTime;
     aiMan.mass          = aiMan.startMass;
     aiMan.maxSpeed      = aiMan.startMaxSpeed;
     aiMan.AiSteer(v);
 }
示例#2
0
 void Movement()
 {
     //Not needed can fix, look into Djikastro/navmesh
     v                   = ((tmpTarget.position + aiEnem.velocity - transform.position) * maxVelocity).normalized;
     force               = v - CurrentVelocity;
     CurrentVelocity    += force * Time.deltaTime;
     transform.position += CurrentVelocity * Time.deltaTime;
     aiMan.mass          = aiMan.startMass;
     aiMan.AiSteer(v);
 }
示例#3
0
 // Update is called once per frame
 void Update()
 {
     v                   = ((transform.position) * maxVelocity);
     force               = v - CurrentVelocity;
     CurrentVelocity    += force * Time.deltaTime;
     transform.position += CurrentVelocity * Time.deltaTime;
     aiMan.AiSteer(v);
 }
示例#4
0
 void Seek()
 {
     v                   = ((tmpTarget.position - transform.position) * maxVelocity).normalized;
     force               = v - CurrentVelocity;
     CurrentVelocity    += force * Time.deltaTime;
     transform.position += CurrentVelocity * Time.deltaTime;
     aiMan.AiSteer(v);
 }