Skip to content

Instantly share code, notes, and snippets.

@FelixWolf
Last active October 28, 2025 15:47
Show Gist options
  • Select an option

  • Save FelixWolf/d91632a719a4e91221ff468f3fee637a to your computer and use it in GitHub Desktop.

Select an option

Save FelixWolf/d91632a719a4e91221ff468f3fee637a to your computer and use it in GitHub Desktop.
[WIP] Second Life puppetry protocol rework

Protocol description

{
    uint8 flags:
        bit 1: position
        bit 2: rotation
        bit 3: scale (Unused, but was implemented in puppetry)
        bit 4: IK
        bit 5: Partial
        bit 6-8: unused / future
    
    uint16 flags2:
        bit 1-11: boneID (Up to 2048 bones, more than anyone will need)
        bit 11-16: length
    
    for length:
        if position:
            int16 x
            int16 y
            int16 z
        
        if rotation:
            int16 x
            int16 y
            int16 z
        
        if scale:
            int16 x
            int16 y
            int16 z
}

Length is index 1. If IK, length is the chain length of the IK.

If not IK, length is the number of bones up the hiarchy we are animating. Example: If we specify mWristRight, and a length of 5, we animate this chain:

  1. mWristRight
  2. mElbowRight
  3. mShoulderLeft
  4. mCollarRight
  5. mChest

If position, rotation, and scale are both zero, stop animating those bones.

BoneID is the ID of the occurance of the bone in the skeleton. This is received from the default skeleton, or from the bakes service.

Partial indicates that not all the bones have been sent yet, and that more bone updates are coming down the chain.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment