Documentation Search
Godot Apple Plugins Class

CMMagnetometerData

Inherits: RefCounted < Object

A single magnetometer sample produced by CMMotionManager.

Description

Wraps Apple’s CMMagnetometerData. Provides the raw magnetic field reading in microteslas along each device axis. Includes bias from device magnetic interference. For a bias-corrected value, use device-motion updates and read CMDeviceMotion.magnetic_field instead. See Apple’s CMMagnetometerData reference.

Tutorials

Properties

Vector3

magnetic_field

float

timestamp


Property Descriptions

Vector3 magnetic_field 🔗

  • void set_magnetic_field(value: Vector3)

  • Vector3 get_magnetic_field()

Magnetic field strength along each axis in microteslas (µT).


float timestamp 🔗

  • void set_timestamp(value: float)

  • float get_timestamp()

The time at which the sample was taken, in seconds since device boot.