Build a Bone-Based Animated Entity Model
Understand the Necromancer System
Veil Lib's Necromancer system powers skeleton-based animations. It lets you define bone hierarchies and animate them independently from the entity's standard animation system. This is essential for complex rigs like characters with multiple limbs, facial features, or equipment that moves separately.
Define Your Skeleton Structure
Create a skeleton by defining bones and their parent-child relationships. Each bone can have its own transform (position, rotation, scale). Necromancer manages these transforms and applies them to your model during rendering.
Apply Animations to Bones
Use Veil Lib's mathematical easing functions to create smooth, natural motion. Define keyframes for bone rotations and positions, then apply easing curves (linear, ease-in, ease-out, etc.) to interpolate between them. This produces fluid animations instead of stiff, instant changes.
Bind the Skeleton to Your Model
Link your animated skeleton to your entity's mesh. Veil Lib handles applying bone transforms to vertices during rendering. Test your animations in-game and refine bone weights and timing until movement looks natural.