group2 0.1.0
CSE 125 Group 2
Loading...
Searching...
No Matches
HitboxRig Struct Reference

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< HitboxDefdefinitions

Detailed Description

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.

Member Function Documentation

◆ buildMixamoDefault()

HitboxRig HitboxRig::buildMixamoDefault ( )
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.

Here is the caller graph for this function:

◆ resolveIndices()

void HitboxRig::resolveIndices ( const std::unordered_map< std::string, int > & jointMap)
inline

Resolve bone names to runtime joint indices.

Parameters
jointMapBone name -> index mapping from CharacterRig::jointMap().

Member Data Documentation

◆ definitions

std::vector<HitboxDef> HitboxRig::definitions

The documentation for this struct was generated from the following file: