April 2015
Beginner to intermediate
494 pages
10h 26m
English
Handling input devices is essential to any application, but probing sensors is important for the smartest one! The most spread sensor among Android game applications is the accelerometer.
An accelerometer, as its name suggests, measures the linear acceleration applied to a device. When moving a device up, down, left, or right, the accelerometer gets excited and indicates an acceleration vector in 3D space. Vector is expressed in relation to the screen's default orientation. The coordinate system is relative to the device's natural orientation:
Axes become inverted if the device is rotated (for example, Y points left if the device is rotated 90 degrees clockwise). ...
Read now
Unlock full access