Car NOS Boost

I’m doing a racing game and i was wondering if anyone knew how i could do a speed boost. I’m fairly new to Unity so i don’t really know what i’m doing.

I’m building this upon the car tutorial so that I don’t have to rebuild the terrain or the car.

I’ll be giving you general help to help you learn, rather than looking up this tutorial and telling you the exact code.

Find the code that makes the car go when you press the accelerator button. Somewhere it will define how fast the car goes. Add a condition that if the boost is active, probably triggered by a Button press, the speed or acceleration rate of the car should be higher.

Sorry For Grave Digging. But i thought i would answer this so other people could see it aswell… This isn’t the best way to do “NOS” But it works :slight_smile:

#pragma strict
var isReady : boolean = true;
var activateSound : AudioClip;
var vehicle : GameObject;
var waitTime : float;

function Start () {


function Update () {
	if(Input.GetKeyDown("left shift") && isReady){

function Nitrous () {
	audio.PlayOneShot(activateSound, 1);
	isReady = false;
	vehicle.rigidbody.AddForce(transform.forward * 1000, ForceMode.Acceleration);
	yield WaitForSeconds(waitTime);
	isReady = true;

you could try this

its free with nitro effect