Documentation Search
Godot Apple Plugins Class

CMMotionActivity

Inherits: RefCounted < Object

A user-activity classification (walking, running, automotive, etc.) from the system motion coprocessor.

Description

Wraps Apple’s CMMotionActivity. More than one activity flag may be set simultaneously (e.g. walking and automotive when the user is moving inside a vehicle). The system uses confidence to indicate how certain the classification is.

See Apple’s CMMotionActivity reference.

Tutorials

Properties

bool

automotive

Confidence

confidence

bool

cycling

bool

running

float

start_date

bool

stationary

bool

unknown

bool

walking


Enumerations

enum Confidence: 🔗

Confidence LOW = 0

Low confidence in the classification.

Confidence MEDIUM = 1

Medium confidence in the classification.

Confidence HIGH = 2

High confidence in the classification.


Property Descriptions

bool automotive 🔗

  • void set_automotive(value: bool)

  • bool get_automotive()

true when the user appears to be in a vehicle.


Confidence confidence 🔗

How confident the system is in this classification.


bool cycling 🔗

  • void set_cycling(value: bool)

  • bool get_cycling()

true when the user appears to be cycling.


bool running 🔗

  • void set_running(value: bool)

  • bool get_running()

true when the user appears to be running.


float start_date 🔗

  • void set_start_date(value: float)

  • float get_start_date()

Unix-time start of the period for which this activity applies, in seconds.


bool stationary 🔗

  • void set_stationary(value: bool)

  • bool get_stationary()

true when the user appears to be stationary.


bool unknown 🔗

  • void set_unknown(value: bool)

  • bool get_unknown()

true when the system cannot classify the user’s activity.


bool walking 🔗

  • void set_walking(value: bool)

  • bool get_walking()

true when the user appears to be walking.