vector

fun vector(type: InputSignal, deadZone: Float = axisDeadZone): Vec2f

Returns the strength of this InputSignal as a vector. This will take the positive X and Y axes and subtract it by the negative X and Y axes. Requires a vector to have been added with the specified type.

Note: This is the same as using axis for both X and Y axes and setting them to a vector.

Return

a Vec2f with Vec2f.x and Vec2f.y set with values between -1 to 1

See also

Parameters

type

the InputSignal strength to check

deadZone

the threshold a GameAxis needs to surpass in order to return a value other than 0.