void FixedUpdate() { if (m_enableSteering) { m_controller.SetSteering(Input.GetAxis("Horizontal")); } if (m_enableThrottle) { m_controller.SetThrottle(Input.GetAxis("Vertical")); } if (m_enableBrake) { m_controller.SetBrake(Input.GetAxis("Jump")); } }
void FixedUpdate() { var steering = NormalizeAngle(HeadingError() + AxleError()); m_controller.SetSteering(Mathf.Rad2Deg * steering, false); }