Type String Event heading (compass) Revision 2017.3060 Keywords heading, compass, magnetic
Provides the heading in degrees (clockwise) relative to the magnetic North Pole.
local function updateCompass( event ) print( "Compass magnetic: " .. event.magnetic ) end Runtime:addEventListener( "heading", updateCompass )