From e04a9e8b3e042c33fec3646c2a3fc377b6714f38 Mon Sep 17 00:00:00 2001 From: Wuzzy Date: Sat, 14 Sep 2019 22:21:27 +0200 Subject: [PATCH] Rotate yaw clockwise (like real compasses) --- init.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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))