How to add NITRO/Speed boost to my vehicle game

i would like to make a nitro to my racing game
here’s what my racing game looks like so far


it will work with a bar that when it’s full you can hold spacebar to get a burst of speed and the bar will go down until it hits 0 then it doesnt work anymore, i think you know how nitro works, does anybody know how to do this

the particle system i can do myself i just dont know how to do the emptying bar that fills up over time and the speed boost, basically the scripting part of the NITRO

Hello @Deadshot1m24,

To create boost refill system, you need to consider few things.

  • You need bind Shift key or any other key though code.
  • Also need to add timer which will reduce boost amount.
  • Then you need to add check if Shift is pressed or not, accordingly you need to increase/decrease the timer.
  • According to this timer you can set the boost value.
  • And according to this boost value you can set UI bar.

If you find above things difficult.
How to Make an Automatic Recharging Stamina Bar [Unity Tutorial]
Then watch this Unity tutorial, Hope it will you to connect missing dots…

1 Like

that’s a unity tutorial Javascript is way different from C# if you are going to help me at least have it in the right programming language, cheers- Deadshot1m24

unity is not playcanvas, it is an entirely different coding language so… i need reliable help also the entire reason i’m posting on the forums is because i DONT know how to code it so i need actual codng help not some tips

Please check this project
Vehicle Physics 3rd Person Cam

Check vehicle.js file it contains speed control.
By pressing Shift you can boost the speed.

I did not added timer and UI to show the boost.

1 Like

thank you it works, but no visual effects :frowning:

add particles when it boosts i guess but idk how