reverseAxis

Reverses a gamepad axis.

A reversed axis produces values reversed symmetrically around the axis standstill value (0). For instance, an horizontal axis will produce values from 100 when held at (left) start of its course, to -100, when held at (right) end of its course, while when not reversed, it will produce values from -100 when held at (left) start of its course, to 100 when held at (right) end of its course. Same thing applies to vertical axes, where produced values will range from 100 (bottom start) to -100 (top end) instead of -100 (bottom start) to 100 (top end).

Reversing an already reversed axis sets the axis back to normal operation mode.

The axis inversion stage occurs before any interpolation formula is applied.

Note that axis inversion has no effect whatsoever on the values sent through axis event listeners for grabbed inputs. In other words, when receiving grabbed axes events, it can be considered that the axis is never reversed.

Parameters

droneModel

drone model for which the axis must be reversed

axis

axis to reverse

See also