O'Reilly logo

Game Programming using Qt 5 Beginner's Guide - Second Edition by Lorenz Haas, Witold Wysota, Pavel Strakhov

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Analog (axis) input

Axis in Qt 3D is an abstraction of analog one-dimensional input. A typical source of axis input is an analog stick of a gamepad. As the name implies, Axis only represents movement along a single axis, so a stick can be represented by two axes—one for vertical movement and one for horizontal movement. A pressure-sensitive button can be represented by a single axis. An axis input produces a float value ranging from −1 to 1, with zero corresponding to the neutral position.

That being said, there is no gamepad support in Qt 3D at the time of writing. It's possible that it will be added in future versions. You can also use the extensible C++ API of Qt 3D to implement the gamepad device using Qt Gamepad. However, the simplest ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required