SDK 6.3/C++/Motion Sensors
Jump to navigation
Jump to search
Official WOWCube SDK documentation. SDK 6.3, C++ (WebAssembly) API. Signatures are extracted from the canonical SDK headers shipped with the WOWCube Development Kit; the headers remain authoritative.
SDK 6.3 · PAWN API: Core ·
Graphics ·
Topology ·
Sound ·
Motion Sensor ·
Leaderboard ·
Splash Screen ·
Physics ·
Network ·
Save ·
Scramble ·
Logging
C++: Native API · Application · GFX Engine · Rust: Rust API (experimental) · Changelog
← SDK 6.3 · C++ Native API / Motion Sensors
Per-display accelerometer and gyroscope readings.
Shared types, enums and constants are listed on the Native API overview.
Contents
Minimal example
Reading tilt for the screen currently being rendered:
i32_t ax = MS_getFaceAccelX(screen.ID()); i32_t ay = MS_getFaceAccelY(screen.ID()); // move the ball by the tilt of this display pos.X += ax / 64.0f; pos.Y += ay / 64.0f;
Functions
MS_getFaceAccelX
Syntax:
i32_t MS_getFaceAccelX(u32_t display)
Description:
- Get accelerometer value along X axis of some display.
Return values:
- Accelerometer value along X axis.
MS_getFaceAccelY
Syntax:
i32_t MS_getFaceAccelY(u32_t display)
Description:
- Get accelerometer value along Y axis of some display.
Return values:
- Accelerometer value along Y axis.
MS_getFaceAccelZ
Syntax:
i32_t MS_getFaceAccelZ(u32_t display)
Description:
- Get accelerometer value along Z axis of some display.
Return values:
- Accelerometer value along Z axis.
MS_getFaceGyroX
Syntax:
i32_t MS_getFaceGyroX(u32_t display)
Description:
- Get gyroscope value around X axis of some display.
Return values:
- Gyroscope value around X axis.
MS_getFaceGyroY
Syntax:
i32_t MS_getFaceGyroY(u32_t display)
Description:
- Get gyroscope value around Y axis of some display.
Return values:
- Gyroscope value around Y axis.
MS_getFaceGyroZ
Syntax:
i32_t MS_getFaceGyroZ(u32_t display)
Description:
- Get gyroscope value around Z axis of some display.
Return values:
- Gyroscope value around Z axis.