vector2Input
vector2Input(
vectorInputOptions?):VectorInputDeclaration
Two axes the player holds as one stick, which ride every tick’s input:
a move, a ship’s thrust. Its value is { x, y }, at most 1 long, at
rest { x: 0, y: 0 }, each component one of 255 values. With keys,
each key pushes it one way, and two directions held at once make a
diagonal 1 long; setInput sets any value. With touch, the engine
draws a stick for it on a phone, added to its keys, as Unity’s
OnScreenStick fills an action. As Unity’s Vector2 action and
Unreal’s 2D axis.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
vectorInputOptions |
VectorInputOptions |