Unity 2018 Artificial Intelligence Cookbook(Second Edition)
上QQ阅读APP看书,第一时间看更新

How to do it...

We just need to change the SetSteering function's signature and definition:

public void SetSteering (Steering steering, float weight) 
{ 
    this.steering.linear += (weight * steering.linear); 
    this.steering.angular += (weight * steering.angular); 
}