mirror of
https://repo.or.cz/minetest_orienteering.git
synced 2025-03-28 19:52:34 +01:00
Rotate yaw clockwise (like real compasses)
This commit is contained in:
3
init.lua
3
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))
|
||||
|
Reference in New Issue
Block a user