return { tag = 'input', summary = 'Get skeletal joint transforms tracked by a device.', description = [[ Returns a list of joint transforms 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 transforms, instead of allocating a new one.' } }, returns = { transforms = { type = 'table', description = [[ A list of joint transforms for the device. Each transform is a table with 3 numbers for the position of the joint, 1 number for the joint radius (in meters), and 4 numbers for the angle/axis orientation of the joint. There is also a `radius` key with the radius of the joint as well. ]] } }, variants = { { arguments = { 'device' }, returns = { 'transforms' } }, { arguments = { 'device', 't' }, returns = { 'transforms' } } }, notes = [[ If the Device does not support tracking joints or the transforms 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. Here's a picture, courtesy of Khronos Group: ![Hand Skeleton Joints](https://lovr.org/img/hand-skeleton.png) 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(pass) for _, hand in ipairs({ 'left', 'right' }) do for _, joint in ipairs(lovr.headset.getSkeleton(hand) or {}) do pass:points(unpack(joint, 1, 3)) end end end ]], related = { 'lovr.headset.getPose', 'lovr.headset.animate' } }