+ shaders.particles:send("headPos", vec3(x, y, z))
+ local positions = {}
+ local velocities = {}
+ for _, hand in ipairs(lovr.headset.getHands()) do
+ local x, y, z, a, ax, ay, az = lovr.headset.getPose(hand)
+ local pos = vec3(x, y, z)
+ hands[hand].vel:set((pos - hands[hand].pos) / dt)
+ hands[hand].pos:set(pos)
+ hands[hand].rot:set(a, ax, ay, az)
+ table.insert(positions, pos)
+ table.insert(velocities, hands[hand].vel)
+ end
+ compute.particles:send("handPos", positions)
+ compute.particles:send("handVel", velocities)
+