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); 
} 

Get Unity 2018 Artificial Intelligence Cookbook - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.