Saltar al contenido principal

world.input

Functions

FunctionDescription
disablePointerLockRequestDisables the pointer lock request on click.
enablePointerLockRequestRequest a pointer lock from the user when the screen is clicked.
getActionReturns > 0 if the action was triggered. Value is usually from 0 to 1. The exception is mouse velocity and scroll which is uncapped.
getActiveMapGet the active action map.
getAxisReturns the value of the axis of the gamepadIdx.
getButtonReturns true while the virtual button identified by buttonName is held down.
getButtonDownReturns true during the frame the user pressed down the button mapped to the index https://www.w3.org/TR/gamepad/#remapping
getButtonUpReturns true the first frame the user releases the button.
getGamepadsReturns all gamepads connected to the device.
getKeyReturns true while the user holds down the key identified by name.
getKeyDownReturns true during the frame the user starts pressing down the key identified by name.
getKeyUpReturns true during the frame the user releases the key identified by name.
getMouseButtonReturns true while the user holds down the mouse button identified by button number.
getMouseDownReturns true during the frame the user starts pressing down on the mouse button.
getMousePositionReturns the x and y position of the mouse in the screen.
getMouseScrollReturns the x and y velocity of mouse scroll.
getMouseUpReturns true during the frame the user releases the mouse button.
getMouseVelocityReturns the x and y velocity of the mouse.
setActiveMapSet the active action map.