I am making a game, I want to use spacebar to slow time and when we press again spacebar time should be normal. How do I make this thing happen.
I have attached an example I did for another forum member the other day for showing and hiding layers using the same key, you should be able to adapt it to do what you need
Hope that helps.
Develop games in your browser. Powerful, performant & highly capable.