|
group2 0.1.0
CSE 125 Group 2
|
Hitbox rig (shared per character archetype). More...
#include <Hitbox.hpp>
Public Member Functions | |
| void | resolveIndices (const std::unordered_map< std::string, int > &jointMap) |
| Resolve bone names to runtime joint indices. | |
Static Public Member Functions | |
| static HitboxRig | buildMixamoDefault () |
| Build the default Mixamo-rig hitbox definitions (12 capsules). | |
Public Attributes | |
| std::vector< HitboxDef > | definitions |
Hitbox rig (shared per character archetype).
Collection of hitbox definitions for a character rig.
Built once at startup. All entities using the same skeleton share one HitboxRig instance. Call resolveIndices() after loading the skeleton to map bone names to runtime joint indices.
|
inlinestatic |
Build the default Mixamo-rig hitbox definitions (12 capsules).
Capsule dimensions are in WORLD units (the same units as the player AABB: standing height = 2 * k_standingHalfHeight = 72). They are scale-invariant — updateHitboxes divides the bone-local offset by rigScale so the same values produce the same physical capsule on any rig regardless of its model-space scale (so re-exporting the model at a different scale no longer breaks the hitboxes). Values below are a starting point converted from the previous ~170-unit-model tuning; expect to hand-tune against the current character.
|
inline |
Resolve bone names to runtime joint indices.
| jointMap | Bone name -> index mapping from CharacterRig::jointMap(). |
| std::vector<HitboxDef> HitboxRig::definitions |