VR: avatar head and neck follow the headset (look-at style), body turns past the neck's limits #1121

Open
opened 2026-10-26 20:55:24 +00:00 by sky_line · 2 comments
Owner

Part of #1072 (first pass on VR animation control). Owner, 2026-10-26: hook the avatar's head and neck up to follow the VR camera, similar to look-at but with tilt as well, and have the avatar turn when the head turns past its limits.

Behaviour:

  • Head yaw and pitch, and roll (tilt), follow the headset's orientation relative to the body, split between neck and head joints like look-at does, with per-joint limits.
  • Past the yaw limit the avatar's body turns to follow (smoothly, with some hysteresis so small head turns don't spin the body); the body's turn is the agent's real rotation, so it is sent to the sim.
  • Animations still play underneath; the head/neck override layers on top with a priority like look-at.

What others see -- check before promising: local joint rotations are not transmitted. Others normally see head direction only through the look-at target (yaw/pitch) and the body's rotation; roll is probably local only. Decide: drive the transmitted look-at target from the headset as well (so others see where you look), and keep tilt local.

Comfort: the VR camera stays on the headset; this only moves the avatar (no camera coupling back into the view). Mouselook-style body follow must not fight the snap/smooth turn.

Test: in VR, look left/right/up/down and tilt: your avatar's head follows (mirror window or a second viewer); turn past ~70 deg: the body turns; a second viewer sees the head direction change.

Part of #1072 (first pass on VR animation control). Owner, 2026-10-26: hook the avatar's head and neck up to follow the VR camera, similar to look-at but with tilt as well, and have the avatar turn when the head turns past its limits. **Behaviour:** - Head yaw and pitch, and roll (tilt), follow the headset's orientation relative to the body, split between neck and head joints like look-at does, with per-joint limits. - Past the yaw limit the avatar's body turns to follow (smoothly, with some hysteresis so small head turns don't spin the body); the body's turn is the agent's real rotation, so it is sent to the sim. - Animations still play underneath; the head/neck override layers on top with a priority like look-at. **What others see -- check before promising:** local joint rotations are not transmitted. Others normally see head direction only through the look-at target (yaw/pitch) and the body's rotation; roll is probably local only. Decide: drive the transmitted look-at target from the headset as well (so others see where you look), and keep tilt local. **Comfort:** the VR camera stays on the headset; this only moves the avatar (no camera coupling back into the view). Mouselook-style body follow must not fight the snap/smooth turn. **Test:** in VR, look left/right/up/down and tilt: your avatar's head follows (mirror window or a second viewer); turn past ~70 deg: the body turns; a second viewer sees the head direction change.
sky_line added this to the Slipstream project 2026-10-26 20:55:24 +00:00
Author
Owner

Owner decision (2026-10-26): tilt (roll) is sent alongside the look-at so other users see your head tilt.

The look-at effect (ViewerEffect, LookAt type) carries only a target position (TypeData: source id, target id, global position, look-at type: 57 bytes) -- no roll. So:

  • Stock viewers (Firestorm, LL) can only show yaw/pitch from the target; they will not show tilt whatever we send.
  • Slipstream-to-Slipstream: carry the roll in the same ViewerEffect without changing what stock viewers read. Candidates, to verify in-world with two viewers before choosing:
    1. the effect's Color field (4 bytes, sent for every effect; check stock viewers ignore it for look-at and the sim relays it unchanged);
    2. extra bytes after the 57-byte TypeData (TypeData is Variable 1) -- ONLY if stock viewers accept a longer look-at block (check LLHUDEffectLookAt::unpackData's size check in LL / Firestorm source); otherwise this breaks their look-at for us.
  • Receiving Slipstream viewers apply the roll to the sender's head/neck (split like the yaw/pitch, same limits), smoothed, and only while the look-at is fresh.
  • Rate: no more than the look-at already sends (it's throttled); quantise roll (e.g. 1 degree) so a steady head sends nothing new.
  • Test: two Slipstream viewers + one stock viewer side by side: tilt your head in VR -> the Slipstream observer sees the tilt, the stock observer still sees correct yaw/pitch and nothing broken.
**Owner decision (2026-10-26): tilt (roll) is sent alongside the look-at so other users see your head tilt.** The look-at effect (ViewerEffect, LookAt type) carries only a target position (TypeData: source id, target id, global position, look-at type: 57 bytes) -- no roll. So: - Stock viewers (Firestorm, LL) can only show yaw/pitch from the target; they will not show tilt whatever we send. - Slipstream-to-Slipstream: carry the roll in the same ViewerEffect without changing what stock viewers read. Candidates, to verify in-world with two viewers before choosing: 1. the effect's `Color` field (4 bytes, sent for every effect; check stock viewers ignore it for look-at and the sim relays it unchanged); 2. extra bytes after the 57-byte TypeData (TypeData is Variable 1) -- ONLY if stock viewers accept a longer look-at block (check LLHUDEffectLookAt::unpackData's size check in LL / Firestorm source); otherwise this breaks their look-at for us. - Receiving Slipstream viewers apply the roll to the sender's head/neck (split like the yaw/pitch, same limits), smoothed, and only while the look-at is fresh. - Rate: no more than the look-at already sends (it's throttled); quantise roll (e.g. 1 degree) so a steady head sends nothing new. - Test: two Slipstream viewers + one stock viewer side by side: tilt your head in VR -> the Slipstream observer sees the tilt, the stock observer still sees correct yaw/pitch and nothing broken.
Author
Owner

Owner, 2026-10-26: compatibility with stock viewers is a non-issue -- they already cannot show our look-at on mesh avatars (they do not get the head/neck treatment Slipstream gives them). So choose the roll encoding on what is cleanest for Slipstream-to-Slipstream; the only hard requirement is that the sim relays it.

Owner, 2026-10-26: compatibility with stock viewers is a non-issue -- they already cannot show our look-at on mesh avatars (they do not get the head/neck treatment Slipstream gives them). So choose the roll encoding on what is cleanest for Slipstream-to-Slipstream; the only hard requirement is that the sim relays it.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
sky_line/Slipstream#1121
No description provided.