Fix hands not being detected

This commit is contained in:
Bones 2024-06-18 05:36:24 -04:00
parent 97aa22d6aa
commit 64fb9d69a2

View file

@ -9,8 +9,8 @@ limbs = {
"head", "head",
"hand/left", "hand/left",
"hand/right", "hand/right",
"hand/left/point", "hand/left/grip",
"hand/right/point", "hand/right/grip",
"elbow/left", "elbow/left",
"elbow/right", "elbow/right",
"shoulder/left", "shoulder/left",
@ -255,8 +255,8 @@ function modeConfigure(pass)
local hx, hy, hz = lovr.headset.getPosition("head") local hx, hy, hz = lovr.headset.getPosition("head")
for _, hand in ipairs(hands) do for _, hand in ipairs(hands) do
if isTracked(hand .. "/point") then if isTracked(hand) then
local cx, cy, cz = lovr.headset.getPosition(hand .. "/point") local cx, cy, cz = lovr.headset.getPosition(hand)
-- Compute the direction from the controller to the headset -- Compute the direction from the controller to the headset
local dirX = hx - cx local dirX = hx - cx
@ -347,4 +347,4 @@ end
function lovr.draw(pass) function lovr.draw(pass)
mode(pass) mode(pass)
end end