Skip to content

VR hero speed: one measurement in the rig, and a walk/run/sneak rule for Flat #566

Backlog

Description

@BoroBongo

Follow-ups from the review of the hero body state fix (fix/hero-body-state). That fix gives every NPC BS_STAND as its start value. It also takes the VR hero's speed from the rig's movement per frame instead of CharacterController.velocity, which stays 0 while moving under the XRI rig: the ground snap's downward Move() comes last in the frame. These items were left for later.

One place for the hero's speed

  • The rig measures the hero's horizontal speed once (IVrRig.Velocity or HorizontalSpeed), from the walk Move() before XriRig.SnapToGround() or from the root's movement per frame. Today the speed is worked out in two places: VRHeroMovement.UpdateHeroBodyState and VrHeroSwimPose.GetVelocity, which has a smoothed root-movement fallback.
  • VRSpellTransformPuppet (lines ~668 and ~790) still reads CharacterController.velocity for its run attack and walk. Under XRI it is always 0, so a hero transformed into an animal probably never counts as running. Switch it to the rig's speed.
  • To decide: does physical room-scale walking count as BS_WALK? Today it doesn't (the rig root doesn't move). Does standing on a moving mover or ship count as walking or running? Today it does (the root moves).

Flat

  • The rule "movement speed -> BS_WALK / BS_RUN / BS_SNEAK, sticky run, sneak talent" lives in the VR adapter VRHeroMovement. The Flat hero never gets a walk or run state, so NPCs can't hear him and ZS_Attack_Loop's run-away ($RUNCOWARD) can't trigger. Move the decision into Core (e.g. HeroBodyStateDomain, owned by PlayerService). VR and Flat then only supply the measurements.

Activity

  1. BoroBongo commented on Nov 30, 2026

    @BoroBongo
    ContributorAuthor

    Not covered by #583/#585. #583 only makes VRHeroMovement the single writer of the rig's walk/run speed settings.
    Still open: no single speed measurement in IVrRig. VRSpellTransformPuppet and VrHeroSwimPose still read CharacterController.velocity.
    Room-scale and mover questions are undecided. There is no Core walk/run/sneak rule for Flat.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions