Please implement mouse movement via a vector for the UHK. Currently, pressing the up and left mouse keys simultaneously on the keyboard moves the mouse faster across the screen than pressing just one of the buttons. Having the mouse speed be inconsistent depending on whether or not you are moving the pointer diagonally is bad UX. This is basic functionality for a WASD-style input in any video game.
I believe the current implementation looks like this:
perFrameFunction(){
pointerPos = {x, y}
pointerSpeed = // Some acceleration math
if (mouseKeyUpPressed) {
pointerPos.x += pointerSpeed
}
if (mouseKeyRightPressed) {
pointerPos.y += pointerSpeed
}
// Similar code for down and left
}
It should look like this:
perFrameFunction(){
pointerPos = {x, y}
pointerVector = {x, y} // Normalized value - vector length is 1
pointerSpeed = // Some acceleration math
if (mouseKeyUpPressed) {
pointerVector.x += pointerTurnRate
}
if (mouseKeyRightPressed) {
pointerVector.y += pointerTurnRate
}
// Similar code for down and left
pointerPos += normalize(pointerVector) * pointerSpeed
}