I just want to know how to change the “w” in this line from w to spacebar. all help is appreciated.
if(keyPress.W && ground) {
this.yspd += -this.jspd;
}
With your permission, GameDev.net uses analytics cookies to understand how people use the platform. You can accept analytics or continue with necessary cookies only. Learn more