Interface IGameControllerMotionEvent
interface IGameControllerMotionEvent
Extends IInputEvent
Interface defines GameControllerMotionEvent.
AxisValue denotes the absolute change made by the user while
interacting with the gaming device. Check AxisCode definition
to know about the ranges for each axis.
IInputEvent.timestamp() represents the IGameControllerMotionEvent
timestamp i.e when the system generated the event which will be
aggregation of one or more changed axis.
To query the timestamp of each axis, i.e timestamp when the
axis was last changed can be done using getAxisTimestamp.
Note, some applications might only be interested in AxisValue &
not AxisTimestamp, so we have api to query each one separately.
Methods
getAxisValue()
Get the axis value associated with passed axis. The values are the absolute change in axis and are based on ranges specified for each axis. If there is no change in axis value, default 0.0 is returned.floatgetAxisValue(com.amazon.kepler.input.events.AxisCode*axis)
Parameters
axis
com.amazon.kepler.input.events.AxisCode* — Required
is one of the axis defined in [AxisCode].
Returns
float
float value for the given Axis.
Throws
InvalidArgumentError— if axis is not in valid game controller axis.
getAxisTimestamp()
Get the axis timestamp associated with passed axis.com.amazon.apmf.MonotonicInstantgetAxisTimestamp(com.amazon.kepler.input.events.AxisCode*axis)
Parameters
axis
com.amazon.kepler.input.events.AxisCode* — Required
is one of the axis defined in [AxisCode].
Returns
com.amazon.apmf.MonotonicInstant
MonotonicInstant value for the given Axis.
Throws
InvalidArgumentError— if axis is not in valid game controller axis.

