event.magnetic

Type String
Event heading (compass)
Revision Current Public Release (2017.3068)
Keywords heading, compass, magnetic

Overview

Provides the heading in degrees (clockwise) relative to the magnetic North Pole.

Example

local function updateCompass( event )
    print( "Compass magnetic: " .. event.magnetic )
end
 
Runtime:addEventListener( "heading", updateCompass )