diff --git a/augment/modules/wh.lua b/augment/modules/wh.lua index 938be91..eb78066 100644 --- a/augment/modules/wh.lua +++ b/augment/modules/wh.lua @@ -2,15 +2,18 @@ return function() local playerLookVector = nil local function updateLookVector() - -- pitch: + -- yaw: -- 0 => positive Z -- 90 => negative X + -- pitch: + -- 0 => forward + -- 90 => down local yawr = math.rad(player.yaw) local pitchr = math.rad(player.pitch) local cosPitch = math.cos(pitchr) local x = cosPitch * -math.sin(yawr) local z = cosPitch * math.cos(yawr) - local y = math.sin(pitchr) + local y = -math.sin(pitchr) playerLookVector = {x, y, z, x = x, y = y, z = z} return playerLookVector end