Conversation
This branch was successfully deployed
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.
[WIP] Animation system part 1 — Humanoid animator, networking, combat & emote integration
Summary
Implements the humanoid animation system requested in #1333. Adds a layered Animator
Controller — base layer for movement/posture (idle/walk/run/limp, crawling, sitting),
an additive Injury layer for one-shot flinch reactions per body region, independent
Hold Left / Hold Right layers for per-arm held-item poses, a data-driven Emote layer
gated by current posture, and an upper-body-masked Action layer so hits and throws
still play while sitting. Also adds the networked
HumanoidAnimatorControllerAPI,wires the hit animation into
HitInteraction, and includes 6 debug console commandsto exercise each piece independently.
Included:
HumanoidAnimatorControllerC# API (posture, limp, hold pose, flinch, emote, throw, hit)NetworkAnimator, server-authoritative hitrelay via
[Server]+[ObserversRpc]HitInteraction→ attacker's swing animation)posture,limp,holdpose,flinch,emote,throwanim)EmoteDataScriptableObject framework, one Wave emote as exampleNot included:
throwanimis adebug-only stand-in)
SetLegInjuryhas no caller yet;FeetControlleronlyexposes one combined health factor today)
PR checklist
Pictures/Videos
2026-07-25.10-29-38.1.mp4
Testing
Use the debug console commands to exercise each layer in isolation:
posture (stand|sit|prone)— verify base layer transitionslimp (amount)— float -1 (left leg hurt) to 1 (right leg hurt), verify limp blendholdpose (left|right) (none|briefcase|drink|underarm|shoulder|waiter)— verifyindependent per-arm hold poses
flinch (armleft|armright|legleft|legright|headfront|headback|torsofront|torsoback)—verify one-shot additive flinch
emote (emote name)— verify emote plays and is correctly gated by posturethrowanim (left|right)— verify throw animation in isolationFor combat: land a melee hit in
HitInteractionand confirm the swing animation playson the attacker for all observers.
Known issue affecting testing: the hit trigger currently does nothing in-game due
to a parameter name mismatch — see Known Issues #1 below. Use
throwanimor manualAnimator window testing to verify the Action layer transitions themselves work.
Networking checklist
Changes
Assets/Scripts/SS3D/Systems/Entities/Humanoid/HumanoidAnimatorController.csnowderives from
NetworkActorinstead ofActor, exposingSetPosture,SetLegInjury,SetHoldPose,TriggerFlinch,TryPlayEmote,TryGetEmote,TriggerThrowLocal(owner-only) and
ServerTriggerHit([Server]). All parameters are referenced viaAnimator.StringToHashconstants inAnimations.Humanoidrather than string literals.Supporting types added:
Posture,HandSide,HoldPose,FlinchRegion,EmoteData.Known issues (need fixing before this is fully playable):
HitTriggerLeftparameter inHumanCharacterAnimator.controllerhas aleading space (
" HitTriggerLeft"), so the hashed name from code never matches andServerTriggerHit(HandSide.Left)silently does nothing. Needs renaming in theAnimator Controller (parameter + transition condition).
.animclips +.metafiles andWaveEmote.assetare sitting directly underAssets/instead of the correct Human folder. The Animator currently referencesthem by GUID so functionality isn't broken, but they need moving via the Unity
Editor (to preserve GUID wiring) and stray duplicates need deleting.
HumanHItL.anim,HUmanLimpLeft.anim.SetLegInjuryhas no caller yet — waiting on per-leg health plumbing.TriggerThrowLocalhas no real gameplay caller yet — only exercised via consoleuntil a throw interaction exists.
Related issues/PRs
Closes #1333.
Dependency context from #1060, additional relevant discussion in #937.