WebCraft icon indicating copy to clipboard operation
WebCraft copied to clipboard

Shift to sprint?

Open andrewgrider opened this issue 6 years ago • 2 comments

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

andrewgrider avatar Apr 06 '18 13:04 andrewgrider

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 ) {

ficopang avatar Apr 07 '18 06:04 ficopang

Yes I found this out yesterday, I added a toggleSprint function that is toggled using the shiftKey but thanks!

andrewgrider avatar Apr 07 '18 13:04 andrewgrider