BasicControlScript

BasicControlScript

Make an entity controllable via mouse and keyboard. WASD keys move the entity towards the back, left,
front and right respectively. Shift causes speed to drop to a tenth. R and F move it up or down. Q and E roll it
towards the left or right. The arrow keys cause the entity to rotate, as does dragging with the mouse.

Constructor

new BasicControlScript(properties)

Parameters:
Name Type Description
properties Object
Properties
Name Type Description
domElement Element

Element to add mouse/key listeners to

Members

movementSpeed :number

The regular speed of the entity.

Default Value:
  • 10

rollSpeed :number

The regular speed of the entity when rolling.

Default Value:
  • 2