Fast Pickup Collect Feature in Unity

Objective: Increase the pickups speed when the plaster press the “C” key

In the powerup script I created a new variable called _extraSpeed and added it to the parameters in the Translate function to move the powerup down.

In the Update method I added a condition to check for the use input, if the user presses the “C” key we set the _extra speed to 6 and in any other case we set the _extraSpeed to 0 again.

And good to go!! Simple feature to make the user move the powerups faster.

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Rusben Guzman

Rusben Guzman

A Software Engineer passionate about game dev and interactive products with Unity. I consider video games to be the artistic expression of programming.