Input & keys
Read keyboard and button input from camera scripts.
Input
Namespace
Functions
| Method | Description |
|---|---|
getKey |
Returns true if this key is currently held down. |
getKeyDown |
Returns true if this key was pressed this frame. |
getKeyUp |
Returns true if this key was released this frame. |
getAnalog |
Returns the value of the analog input for the given axis. |
getMouseDelta |
Returns the position delta of the mouse since the last frame. |
getKey
Returns true if this key is currently held down.
Parameters
| Name | Type |
|---|---|
key |
Key |
Returns: boolean
getKeyDown
Returns true if this key was pressed this frame.
Parameters
| Name | Type |
|---|---|
key |
Key |
Returns: boolean
getKeyUp
Returns true if this key was released this frame.
Parameters
| Name | Type |
|---|---|
key |
Key |
Returns: boolean
getAnalog
Returns the value of the analog input for the given axis.
Parameters
| Name | Type |
|---|---|
key |
Key |
Returns: number
getMouseDelta
Returns the position delta of the mouse since the last frame.
Returns: Vec2
Key
Class