- Home /
Question by
ShawnRamiez · Mar 05, 2017 at 03:25 PM ·
javascriptspeedchange
How do I script speed in java?
I'm making a game where you're a player with special abilities, where "q" switches gravity on and off and "e" is going to change your movement speed. I can't seem to get my coding right for the speed change the gravity change is function Update () { if(Input.GetButtonDown("q")); { Physics.gravity = (0, 10, 0); } }
which when i put it in my game and up the amount of gravity effect it will change it i need a similar code for speed. Thanks!
Comment
Your answer
Follow this Question
Related Questions
change a material from multiple materials 1 Answer
how i know my object speed ? 1 Answer
How to change pace by pressing different buttons once? 1 Answer
Animation speed 2 Answers
how to change pitch of sound without changing speed? wav file 1 Answer