Update nogame;

This commit is contained in:
bjorn 2020-08-30 21:48:47 -06:00
parent d1317d227c
commit 77083d06af
1 changed files with 7 additions and 1 deletions

View File

@ -50,8 +50,14 @@ local function nogame()
if lovr.headset then
for i, hand in ipairs(lovr.headset.getHands()) do
models[hand] = models[hand] or lovr.headset.newModel(hand)
models[hand] = models[hand] or lovr.headset.newModel(hand, { animated = true })
if models[hand] then
if lovr.headset.animate(hand, models[hand]) and models[hand]:hasJoints() then
animatedShader = animatedShader or lovr.graphics.newShader('unlit', {
flags = { animated = true }
})
lovr.graphics.setShader(animatedShader)
end
local x, y, z, angle, ax, ay, az = lovr.headset.getPose(hand)
models[hand]:draw(x, y, z, 1.0, angle, ax, ay, az)
end