Amazon Developer

as

Settings
Sign out
Notifications
Alexa
Amazon Appstore
Ring
AWS
Documentation
Support
Contact Us
My Cases
Get Started
Design and Develop
Publish
Reference
Support
Native
Skip to main content

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()

float getAxisValue(com.amazon.kepler.input.events.AxisCode* axis)
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.

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


getAxisTimestamp()

com.amazon.apmf.MonotonicInstant getAxisTimestamp(com.amazon.kepler.input.events.AxisCode* axis)
Get the axis timestamp associated with passed 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


Last modified on October 29, 2026