ИИ гонщиков, запуск, перезапуск игры и пр
This commit is contained in:
1 parent
f557c58c9d
commit
efcfaae647
48 files changed
+1486
-212
No files matched your search
@@ -16,11 +16,6 @@ namespace Code.Example.Race.Racer.AI.ID
|
||||
velocity = Vector3.zero;
|
||||
steering = new Steering();
|
||||
}
|
||||
|
||||
public void SetSteering(Steering steering)
|
||||
{
|
||||
this.steering = steering;
|
||||
}
|
||||
public virtual void Update ()
|
||||
{
|
||||
Vector3 displacement = velocity * Time.deltaTime;
|
||||
|
||||
@@ -9,8 +9,10 @@ namespace Code.Example.Race.Racer.AI.ID.Behaviours
|
||||
Steering steering = new Steering();
|
||||
|
||||
steering.linear = target.position - transform.position;
|
||||
UnityEngine.Debug.DrawRay(transform.position, steering.linear, Color.yellow, 5f);
|
||||
// steering.linear *= agent.Data.maxAcceleration;
|
||||
steering.linear.Normalize();
|
||||
steering.linear *= agent.Data.maxAcceleration;
|
||||
UnityEngine.Debug.Log(steering.linear);
|
||||
return steering;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user