DEV Community 👩‍💻👨‍💻

Discussion on: Moving a Sprite Sheet Character with JavaScript

martyhimmel profile image
Martin Himmel

The speed should be the same as the horizontal and vertical movements. If you need to slow it down, though, you could add a conditional multiplier so that when there's both horizontal and vertical movement, multiply the speed by 0.8 (or whatever you need).