WebCraft
WebCraft copied to clipboard
Shift to sprint?
Could you add a shift to sprint funciton? I looked at the code but I don't know how to control the player's speed
add var running = this.keys[16]; to player.js before // Walking and add if(running) { velocity.x *= 1.4; velocity.y *= 1.4; } inside if ( walkVelocity.length() > 0 ) {
Yes I found this out yesterday, I added a toggleSprint function that is toggled using the shiftKey but thanks!