Acceleration on boost

Decided to make the boost a little bit fancier by adding acceleration :slight_smile:

The car’s speed now increases over time until it reaches the maximum boost speed. When you hit something the move speed drops to slowSpeed before accelerating to the normal speed.

        if(_hasSpeedBoost && _xSpeed <= _boostSpeed) 
        {
            _xSpeed = Mathf.Min(_xSpeed += _acceleration * Time.deltaTime, _boostSpeed);
        } else if (_xSpeed < _initialSpeed) {
            _xSpeed = Mathf.Min(_xSpeed +=  _acceleration * Time.deltaTime, _initialSpeed);
        }
1 Like

Hahaha full send