Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Describes the state of motion input from a motion-enabled input device.
Syntax
typedef struct GameInputMotionState {
float accelerationX;
float accelerationY;
float accelerationZ;
float angularVelocityX;
float angularVelocityY;
float angularVelocityZ;
float magneticFieldX;
float magneticFieldY;
float magneticFieldZ;
float orientationW;
float orientationX;
float orientationY;
float orientationZ;
GameInputMotionAccuracy accelerometerAccuracy;
GameInputMotionAccuracy gyroscopeAccuracy;
GameInputMotionAccuracy magnetometerAccuracy;
GameInputMotionAccuracy orientationAccuracy;
} GameInputMotionState
Members
accelerationX
Type: float
Linear acceleration, in g-force, along the x-axis.
accelerationY
Type: float
Linear acceleration, in g-force, along the y-axis.
accelerationZ
Type: float
Linear acceleration, in g-force, along the z-axis.
angularVelocityX
Type: float
Angular velocity, in radians per second, with respect to the x axis.
angularVelocityY
Type: float
Angular velocity, in radians per second, with respect to the y axis.
angularVelocityZ
Type: float
Angular velocity, in radians per second, with respect to the z axis.
magneticFieldX
Type: float
Magnetic field along the x-axis.
magneticFieldY
Type: float
Magnetic field along the y-axis.
magneticFieldZ
Type: float
Magnetic field along the z-axis.
orientationW
Type: float
The w-component of a quaternion representing the device's orientation.
orientationX
Type: float
The x-component of a quaternion representing the device's orientation.
orientationY
Type: float
The y-component of a quaternion representing the device's orientation.
orientationZ
Type: float
The z-component of a quaternion representing the device's orientation.
accelerometerAccuracy
Type: GameInputMotionAccuracy
Not implemented.
gyroscopeAccuracy
Type: GameInputMotionAccuracy
Not implemented.
magnetometerAccuracy
Type: GameInputMotionAccuracy
Level of accuracy of the magnetometer values.
orientationAccuracy
Type: GameInputMotionAccuracy
Not implemented.
Remarks
This structure is used by the IGameInputReading::GetMotionState method.
For more information, see the Getting data from readings section of GameInput readings. For a related code example, see A simple gamepad input loop.
Requirements
Header: GameInput.h
Supported platforms: Windows, Xbox One family consoles and Xbox Series consoles