We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
It returns a Vector 2D Object and the movement input from keyboard are mapped to this object.
const direction = Bottlecap.Keyboard.getDirection(); player.position.x += direction.x * SPEED * dt; player.position.y += direction.y * SPEED * dt;
Checks if a key is down
if(Keyboard.keyDown(Keyboard.KEYS.SPACEBAR)) { player.jump(); }