BoneShared.h
Source/MassBattle/Public/Fragments/BoneShared.h
概述Overview
骨骼域的本单位能力:作者编写的布娃娃参数、烘焙出的 socket 清单,以及把瞄准骨名绑定到骨架的两个烘焙骨下标。它在 Agent 配置里以 Bone Shared 条目出现。布娃娃的刚体表与关节表不在这里——它们是体量大的烘焙数据,住在 ATT 资产上。
The bone-domain capability of one unit: the authored ragdoll tuning, the socket inventory discovered by the bake, and the two baked bone indices that bind the aim bone names to the skeleton. It appears as the Bone Shared entry on the agent config. The ragdoll body and joint tables are not here — they are bulk baked data and live on the ATT asset.
边界与注意Caveats
socket 清单为空不代表「关掉了 socket」。它表示还没有烘焙过,或源网格本身没有 socket——不是作者的选择。
An empty socket inventory does not mean sockets are turned off. It means no bake has run yet, or the source mesh carries no sockets — it is not an authoring choice.
布娃娃由 notify 行触发,没有单位级开关。要某个单位倒地时模拟布娃娃,给它的 notify 表加一行 Action = Ragdoll;该动作只在单位处于死亡过程中时生效。每批尸体上限与配对距离在渲染器上,摩擦与休眠阈值/延迟是求解器常量,都不在这里。
The ragdoll is triggered by a notify row; there is no per-unit switch. To simulate a ragdoll when a unit goes down, add a row with Action = Ragdoll to its notify table; the action only takes effect while the unit is dying. The per-batch corpse cap and pairing distance live on the renderer, and friction plus the sleep thresholds and delay are solver constants — none of them here.
两个瞄准骨下标是烘焙产物,不可编辑。烘焙按 Aim 配置上的骨名解析出它们;偏航下标没有解析出来(骨名留空、骨架没有这根骨,或还没有烘焙)时,瞄准关节保持关闭。俯仰下标没有解析出来时,单位被当成没有俯仰关节,攻击的俯仰一侧不构成约束。
The two aim bone indices are bake output and cannot be edited. The bake resolves them from the bone names on the Aim config. When the yaw index is unresolved (empty name, bone absent, or no bake yet) the aim joint stays off. When the pitch index is unresolved the unit is treated as having no pitch joint, so the pitch side of the attack gate is vacuous.
调参不会串到别的单位。socket 清单、布娃娃块与两个骨下标全部参与值相等:任一项不同的两个单位就是不同的共享片段,一个单位的调参因此不会驱动另一个单位的尸体或炮塔;一个单位烘出的骨架也不会被当成另一个单位的。
Tuning never crosses units. The socket inventory, the ragdoll block and both bone indices all take part in value equality: two units differing in any of them are different shared fragments, so one unit's tuning never drives another unit's corpses or turret, and one unit's baked skeleton is never read as another's.
布娃娃的刚体表与关节表烘焙在 ATT 资产上,修改它们需要重新烘焙;本片段只承载按单位可调的那三个值。
The ragdoll body and joint tables are baked onto the ATT asset and need a re-bake to change; this fragment carries only the three per-unit values.