Closed stackotter closed 1 year ago
Feel free to join the Discord server and ask for help if you get stuck. Everyone's happy to help!
done in pr #170
Double tap forwards to sprint was implemented by jxhug, and now just double tap jump to fly remains.
Implement double tap space to unfly (currently the only way to 'unfly' is to hit the ground)
Done now
If you fix this issue it should help you get acquainted with Delta Client's input handling system.
I have grouped these two together because they are clearly very similar features.
The best way to implement this is probably to add a
timeSinceForwards
property and atimeSinceJump
property to theInputState
component. These properties can each be used to store an integer that counts up once per tick and resets when the respective key changes from not pressed to pressed. If the key is pressed a maximum of 6 ticks later, then trigger the respective double tap action (if the action is valid, i.e. if the player is allowed to fly or sprint).