VMDL Hitboxes(击中范围)
From Valve Developer Community
< Dota 2 创意工坊工具集 | VMDL
Hitboxes是和关节的母骨架匹配的有边界的盒子。他们被游戏中许多系统使用,包括但不限于 击中检测,[译存疑]角色/特性 选择(character selection)和粒子发射。
Contents[hide] |
显示
- 开关hitbox显示: Display > Hit Boxes。
- 开关hitbox名称显示: Display->Hit Box Names。
- 如果存在多个设置, Display->Sets 允许通过名字来开关是否显示。
创建
- 右键单击一个大纲(outliner)中的关节项并选择Add Hitbox。
- 使用 Model > Hitboxes 菜单选项。
编辑
- 当一个hitbox在视窗或大纲中被选择时,gizmo便可以使用了。使用gizmo来调整hitbox的尺寸。有两种可使用的模式:调整和box调整。
- 当hitbox被选择时,其可编辑的属性可以通过属性编辑器编辑。
数据结构(Data Structures)
VMDL hitbox的数据结构如下:
CVhitBoxSetListReference[] m_pHitBoxSetLists = [ CVhitBoxSetListReference { CVhitBoxSetList* m_pObject = &CVhitBoxSetList_0 string m_sFileName = "" } ]
m_pHitBoxSetLists
CVhitBoxSetListReference中元素的列表。
CVhitBoxSetListReference
对内部或外部CVhitBoxSetList的参考:
Attribute | Friendly Name | Description | Type | Default Value |
---|---|---|---|---|
属性 | 易记名称 | 描述 | 类型 | 默认值 |
m_pObject | 内部CVhitBoxSetList的指针 | CVhitBoxSetList* | ||
m_sFileName | 外部CVhitBoxSetList的有关路径 | string |
hitbox配置列表如下:
CVhitBoxSetList CVhitBoxSetList_0 { CVhitBoxSet[] m_HitBoxSets = [ CVhitBoxSet { string m_name = "default" CVhitBox[] m_HitBoxes = [ CVhitBox { string m_name = "spine_0" string m_sSurfaceProperty = "" int m_nGroupId = 0 string m_sBoneName = "spine_0" float(3) m_vMinBounds = ( -3.769234, -4.263324, -6.618944 ) float(3) m_vMaxBounds = ( 5.111142, 5.840798, 6.613623 ) uint(4) m_cRenderColor = ( 0, 0, 0, 0 ) }, CVhitBox { string m_name = "head_0" string m_sSurfaceProperty = "" int m_nGroupId = 0 string m_sBoneName = "head_0" float(3) m_vMinBounds = ( -3.821239, -3.392044, -3.581856 ) float(3) m_vMaxBounds = ( 6.065765, 5.141216, 3.582397 ) uint(4) m_cRenderColor = ( 0, 0, 0, 0 ) } ] } ] }
CVhitBoxSetList
包含CVhitBoxSet中元素的列表。

CVhitBoxSet
包含CVhitBox中元素的列表:
Attribute | Friendly Name | Description | Type | Default Value |
---|---|---|---|---|
属性 | 易记名称 | 描述 | 类型 | 默认值 |
m_name | Name | hitbox的名称 | string |
CVhitBox
hitbox数据的解释:
Attribute | Friendly Name | Description | Type | Default Value |
---|---|---|---|---|
属性 | 易记名称 | 描述 | 类型 | 默认值 |
m_name | Name | hitbox的名称 | string | |
m_sSurfaceProperty | Surface Property | 表面属性属于hitbox | string | |
m_nGroupId | Group ID | 组ID,被游戏代码用于查询 | int | 0 |
m_sBoneName | Parent Bone | 母关节的名称 | string | |
m_vMinBounds | Min | hitbox的最小边界 | float(3) | < 0, 0, 0 > |
m_vMaxBounds | Max | hitbox的最大边界 | float(3) | < 0, 0, 0 > |



由AMHC团队汉化 | 汉化问题反馈