Context
The skeletal animation system is complete for rendering (bone/clip import, GPU skinning with palettes in a persistently-mapped GPU buffer, AnimationService managed evaluation, Keyframe Editor) — but bone transforms are consumed ONLY by the skinning shader. There is no way to make a separate entity (weapon, flashlight, hat, lantern) follow a bone. This is the root feature of the whole weapon package: 'merge' an entity into an animation.
Goal
A BoneSocket mechanism: an attached child entity's world transform is driven every frame by (animated bone world matrix × local socket offset). Since AnimationService already evaluates palettes CPU-side, the bone world transforms exist — expose them and apply to attached entities after animation evaluation, before rendering/culling.
Acceptance Criteria
Technical Notes
Evaluate socket transforms exactly once per frame from the same pose the palette upload used — do not re-sample clips a second time (drift). Missing bone name = warning + identity fallback, never a crash. Bone transforms should be queryable (GetBoneWorldTransform) — the muzzle-position raycast in the weapon sample depends on it.
Dependencies
- None (foundation of this epic)
Context
The skeletal animation system is complete for rendering (bone/clip import, GPU skinning with palettes in a persistently-mapped GPU buffer,
AnimationServicemanaged evaluation, Keyframe Editor) — but bone transforms are consumed ONLY by the skinning shader. There is no way to make a separate entity (weapon, flashlight, hat, lantern) follow a bone. This is the root feature of the whole weapon package: 'merge' an entity into an animation.Goal
A
BoneSocketmechanism: an attached child entity's world transform is driven every frame by (animated bone world matrix × local socket offset). SinceAnimationServicealready evaluates palettes CPU-side, the bone world transforms exist — expose them and apply to attached entities after animation evaluation, before rendering/culling.Acceptance Criteria
Technical Notes
Evaluate socket transforms exactly once per frame from the same pose the palette upload used — do not re-sample clips a second time (drift). Missing bone name = warning + identity fallback, never a crash. Bone transforms should be queryable (
GetBoneWorldTransform) — the muzzle-position raycast in the weapon sample depends on it.Dependencies