mirror of
https://repo.or.cz/minetest_orienteering.git
synced 2025-01-09 22:27:30 +01:00
Rotate yaw clockwise (like real compasses)
This commit is contained in:
parent
c74eb0b489
commit
e04a9e8b3e
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))
|
||||
|
Loading…
Reference in New Issue
Block a user