TDW includes support for keyboard and mouse input.
In order to use keyboard and mouse controls, the TDW build window must be focused (i.e. be the selected window). This means that keyboard controls will only work on personal computers.
TDW divides keyboard and mouse input into three "layers":
- Mouse input, which includes button presses, releases, etc. as well as the position of the mouse and any object underneath the cursor. This is handled via the
Mouse
add-on. - A first-person avatar that moves and rotates via keyboard and mouse controls. This is handled via the
FirstPersonAvatar
add-on, a subclass ofMouse
. - Keyboard input for listening to arbitrary key events. This is handled via the
Keyboard
add-on.
Next: Mouse input