diff --git a/init.lua b/init.lua index dab7c21..a862fa3 100644 --- a/init.lua +++ b/init.lua @@ -332,7 +332,8 @@ function orienteering.update_hud_displays(player) str_pos = "" end - local yaw = player:get_look_horizontal()*toDegrees + -- Yaw in Minetest goes counter-clockwise, which is opposite of how compasses work + local yaw = 360-player:get_look_horizontal()*toDegrees local pitch = player:get_look_vertical()*toDegrees if ((compass or gps) and sextant) or quadcorder then str_angles = S("Yaw: @1°, pitch: @2°", string.format("%.1f", yaw), string.format("%.1f", pitch))