Client: remote proxy locomotion (gait + in-air) via snapshot interpolation#53
Merged
Conversation
Re-express the demo's proxy locomotion onto main's ClientHuman. The proxy is moved by the network position (movement disabled), so gait can't come from its velocity: derive ground speed from the per-packet position delta (EWMA) and drive ABP_RemoteAvatar's Speed input from the pak (smooth blend), falling back to single-node clips (ProxyLocomotion) if the ABP/blendspace is unavailable. In-air rides a new stateFlags byte (HumanSync) on HumanEntity via SerializeFields; mount/spell fields are reserved in the wire for the rest of Phase 4. Adds the anim reflection helpers (LoadAnimSequence/Asset, PlayAnimBlended, SetBlendSpaceInputOnSkin) and surfaces CharacterMesh0 from SpawnProxy.
Add a Human.setInAir(bool) scripting binding (sets the InAir state flag, relayed to clients) and upgrade /walknpcs to orbit spawned NPCs through idle→walk→run→ sprint→jump with facing, so remote-proxy locomotion can be eyeballed with one client (/spawnnpc, then /walknpcs to start/stop, /clearnpcs to remove).
b20700d to
9b2cb2b
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Remote-player/NPC proxies now animate their on-foot movement (idle/walk/run/sprint blended by ground speed, plus an in-air fall state) and move smoothly instead of snapping between packets.
Locomotion driver (ClientHuman)
Smooth movement — new snapshot interpolation (core/snapshot_interpolator.h)
Wire (shared/modules/human_sync.hpp, HumanEntity)
Test includes a
/walknpcsto test the gait animations on velocity and visually affirming the interpolation.