Problem Statement

RenIK needs to be updated

Solution

New Semi-Deterministic Walk Cycle System

Six states:

  1. Full Body
    1. Regular updates
      1. New feet transforms
    2. Lerp between updates
  2. Standing still
    1. Perform foot placement just like we were doing in RenIK
    2. Updates only when foot moves
      1. New feet transforms
    3. Lerp to new updates as they are received
  3. Jumping/Falling
    1. Feet dangle loosely behind avatar
    2. No syncing required
  4. Laying down
    1. Feet play a laying down animation
    2. No syncing required
  5. Walking
    1. Updates sent whenever direction or speed changes
      1. Starting feet transforms
      2. Starting player velocity (Already being synced)
      3. Current player transform (Already being synced)
      4. Current player velocity (Already being synced)
    2. Feet transforms are calculated locally between updates
    3. Updates are only sent when direction or velocity changes drastically or when state changes
  6. Running
    1. When the player is moving so fast that avoiding foot sliding is impossible
    2. Updates sent whenever direciton or speed changes
      1. Only current velocity
    3. Feet just do a run cycle with no consideration to shape of terrain since it's now impossible to keep feet planted

We transition smoothly between different states and allow for some overlap between the states to prevent jankiness caused by changing states too fast - i.e. players have to be moving 5% over the speed limit between walking and running to transition to running and 5% below the limit to transition back.

Update messages

  1. Current State
  2. Feet transforms
    1. Can be read as starting feet transforms or current feet transforms depending on the state

Update messages have an expiration time. If no new update comes in before the expiration time, then the current state and feet transforms can be updated by the local client

Walk Cycle