event.geographic

Type Number
Event heading (compass)
Revision Release 2024.3703
Keywords heading, compass, geographic

Overview

Provides the heading in degrees (clockwise) relative to the geographic North Pole, sometimes known as true North.

Example

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