/// <summary>
        /// Uses the output values from the neural net in the controller.
        /// </summary>
        protected override void UseOutputValues()
        {
            driveInput = outputValues[0];
            turnInput  = outputValues[1];

            car.Drive(driveInput);
            car.Turn(turnInput);
        }
Example #2
0
 // axis input needs to go through every frame
 // it will be the case for AI and it is important for the current implentation of the car controller
 private void Update()
 {
     car.Drive(Input.GetAxis("Vertical"));
     car.Turn(Input.GetAxis("Horizontal"));
 }