WOWCube Docs logo
WOWCube Docs
Mission Control
Section Shortcuts
APIExamplesSourceWOWConnectChangelog
Filters
SDK and language defaults persist in cookies.
SDK version
Navigation Tree
Collapsed by default, focused on the active path.
Made byMcKay Seamons
GitHub
  1. Home
  2. Docs
  3. API
  4. PawnLibs/motion\ sensor
Mission NodeSDK 6.1PawnAPI Reference

PawnLibs/motion\ sensor

PawnLibs/motion\ sensor Description Interfaces for getting motion sensor data. Motion sensors are useful for monitoring module movement. Supported sensor dat...

API / SDK 6.1 / Pawn / API Reference

PawnLibs/motion_sensor

Description

Interfaces for getting motion sensor data. Motion sensors are useful for monitoring module movement. Supported sensor data types:

  • accelerometer - acceleration force along 3 axis, measured in m/s^2, range +- 2g TBD: currently raw data is provided, should be redesigned
  • gyroscope - rate of rotation around 3 axis, measured in rad/s, range +-2000 dps TBD: currently raw data is provided, should be redesigned
  • shake - count of shakes in the sequence
  • tap - count of taps in the sequence

PawnLibs/motion_sensor/ON_Shake

Summary

Shakes handler.

Synopsis

PawnLibs/motion\ sensor
PAWN
1forward ON_Shake(const count);
2
Wrapped for easier reading. Turn wrap off to inspect exact line lengths.

Description

Public function with such signature will be called when the shakes sequence is detected. Shake is a continuous significant motion which direction has been changed since the previous recent shake. TBD: current implementation works ineffective, should be redesigned.

Inputs

  • count - how many shakes there are in the shakes sequence

See also

  • SENSITIVITY_MENU_CHANGE_SCRIPT
  • quit()

PawnLibs/motion_sensor/ON_Tap

Summary

Taps handler.

Synopsis

PawnLibs/motion\ sensor
PAWN
1forward ON_Tap(const count, const display, const bool:opposite);
2
Wrapped for easier reading. Turn wrap off to inspect exact line lengths.

Description

Public function with such signature will be called when the taps sequence is detected.

Inputs

  • count - how many taps there are in the taps sequence
  • display - TBD: currently most recent taps axis
  • opposite - true, if most recenttap was detected from the opposite side of cube

PawnLibs/motion_sensor/MS_getFaceAccelX

Summary

Get accelerometer value along X axis of some display.

Synopsis

PawnLibs/motion\ sensor
PAWN
1native MS_getFaceAccelX(const display);
2/* Inputs
3 * * display - for which accelerometer value will be returned
4
Wrapped for easier reading. Turn wrap off to inspect exact line lengths.

Return value

Accelerometer value along X axis.

PawnLibs/motion_sensor/MS_getFaceAccelY

Summary

Get accelerometer value along Y axis of some display.

Synopsis

PawnLibs/motion\ sensor
PAWN
1native MS_getFaceAccelY(const display);
2/* Inputs
3 * * display - for which accelerometer value will be returned
4
Wrapped for easier reading. Turn wrap off to inspect exact line lengths.

Return value

Accelerometer value along Y axis.

PawnLibs/motion_sensor/MS_getFaceAccelZ

Summary

Get accelerometer value along Z axis of some display.

Synopsis

PawnLibs/motion\ sensor
PAWN
1native MS_getFaceAccelZ(const display);
2
Wrapped for easier reading. Turn wrap off to inspect exact line lengths.

Description

Z axis directed towards the center of the cube - TBD: check.

Inputs

  • display - for which accelerometer value will be returned

Return value

Accelerometer value along Z axis.

PawnLibs/motion_sensor/MS_getFaceGyroX

Summary

Get gyroscope value around X axis of some display.

Synopsis

PawnLibs/motion\ sensor
PAWN
1native MS_getFaceGyroX(const display);
2
Wrapped for easier reading. Turn wrap off to inspect exact line lengths.

Description

Value increases clockwise - TBD: check.

Inputs

  • display - for which gyroscope value will be returned

Return value

Gyroscope value around X axis.

PawnLibs/motion_sensor/MS_getFaceGyroY

Summary

Get gyroscope value around Y axis of some display.

Synopsis

PawnLibs/motion\ sensor
PAWN
1native MS_getFaceGyroY(const display);
2
Wrapped for easier reading. Turn wrap off to inspect exact line lengths.

Description

Value increases clockwise - TBD: check.

Inputs

  • display - for which gyroscope value will be returned

Return value

Gyroscope value around Y axis.

PawnLibs/motion_sensor/MS_getFaceGyroZ

Summary

Get gyroscope value around Z axis of some display.

Synopsis

PawnLibs/motion\ sensor
PAWN
1native MS_getFaceGyroZ(const display);
2
Wrapped for easier reading. Turn wrap off to inspect exact line lengths.

Description

Value increases clockwise - TBD: check.

Inputs

  • display - for which gyroscope value will be returned

Return value

Gyroscope value around Z axis.


Jump Grid

On This Page

PawnLibs/motion\ sensor/ON\ ShakePawnLibs/motion\ sensor/ON\ TapPawnLibs/motion\ sensor/MS\ getFaceAccelXPawnLibs/motion\ sensor/MS\ getFaceAccelYPawnLibs/motion\ sensor/MS\ getFaceAccelZPawnLibs/motion\ sensor/MS\ getFaceGyroXPawnLibs/motion\ sensor/MS\ getFaceGyroYPawnLibs/motion\ sensor/MS\ getFaceGyroZ
Context Rail

Related nodes

PawnLibs/wowcore/SELF\ ID
API / SDK 6.1 / Pawn / API Reference
PawnLibs/graphics
API / SDK 6.1 / Pawn / API Reference
PawnLibs/sound/SND\ cacheSounds
API / SDK 6.1 / Pawn / API Reference
PawnLibs/topology
API / SDK 6.1 / Pawn / API Reference
Previous Node
PawnLibs/topology
API / SDK 6.1 / Pawn / API Reference
Next Node
PawnLibs/leaderboard/LB\ INFO
API / SDK 6.1 / Pawn / API Reference