return { tag = 'input', summary = 'Get skeletal joint poses tracked by a device.', description = [[ Returns a list of joint poses tracked by a device. Currently, only hand devices are able to track joints. ]], arguments = { device = { type = 'Device', description = 'The Device to query.' }, t = { type = 'table', description = 'A table to fill with the joint poses, instead of allocating a new one.' } }, returns = { poses = { type = 'table', description = [[ A list of joint poses for the device. Each pose is a table with 3 numbers for the position of the joint followed by 4 numbers for the angle/axis orientation of the joint. ]] } }, variants = { { arguments = { 'device' }, returns = { 'poses' } }, { arguments = { 'device', 't' }, returns = { 'poses' } } }, notes = [[ If the Device does not support tracking joints or the poses are unavailable, `nil` is returned. The joint orientation is similar to the graphics coordinate system: -Z is the forwards direction, pointing towards the fingertips. The +Y direction is "up", pointing out of the back of the hand. The +X direction is to the right, perpendicular to X and Z. Hand joints are returned in the following order:
Joint Index
Palm 1
Wrist 2
Thumb Metacarpal 3
Proximal 4
Distal 5
Tip 6
Index Metacarpal 7
Proximal 8
Intermediate 9
Distal 10
Tip 11
Middle Metacarpal 12
Proximal 13
Intermediate 14
Distal 15
Tip 16
Ring Metacarpal 17
Proximal 18
Intermediate 19
Distal 20
Tip 21
Pinky Metacarpal 22
Proximal 23
Intermediate 24
Distal 25
Tip 26
]], example = [[ function lovr.draw() for _, hand in ipairs({ 'left', 'right' }) do for _, joint in ipairs(lovr.headset.getSkeleton(hand) or {}) do lovr.graphics.points(unpack(joint, 1, 3)) end end end ]], related = { 'lovr.headset.getPose', 'lovr.headset.animate' } }