Body point, sight point and aim point (model nodes + executable)

Which point of a character the lock, the sight tests, the CPU and the shots use. Units: u = 0.1 m.

The five named model nodes. The character’s model object sits at C + 0x13b80; its set-up (0x14025d380, from the character set-up at 0x1402511b4) walks the model’s node records and compares each record’s packed name (u32, six characters in base 40, the same packing as the script function names) with a table of five ids at 0x1402dcdd8. A match stores a pointer to that node’s world matrix (matrix array base + (node index + 1) × 0x40) in the pointer array at model + 0x230 = C + 0x13db0 (the earlier notes put the array’s start at C + 0x13db8, which is its entry 1):

entry character field packed id node readers
0 C + 0x13db0 0x89117630 left hand none found
1 C + 0x13db8 0xADB07630 right hand blade init / tick (0x140269c60, 0x140269db0), melee tick (0x14026a0d0)
2 C + 0x13dc0 0x4D1D1710 torso root (the node directly over the hips; all upper-body nodes hang off it) the body point build 0x1402513a0
3 C + 0x13dc8 0x4698B638 a helper node (by its name a transparency helper; purpose not followed) none found
4 C + 0x13dd0 0x70320580 head 0x1401bc54e.. (story event code)

A sixth id, 0x511D082B, is tested in the same loop: the node’s translation address goes to model + 0x260 = C + 0x13de0, the play camera’s anchor (“Play camera” tick step 4). In all eleven playable models that node is a direct child of the model root with a zero rest offset, so the camera anchor is the model origin (the feet) unless a motion moves the node (H for the node, M for “no motion moves it”: the motion files were not checked).

In the model file the node records are the 0x40-byte skeleton joint records (nine floats, u16 flags at 0x24, u16 index at 0x26, s16 parent at 0x2A, u32 packed name at 0x2C); the ids above were found once each in every playable model file (H).

The body point (C + 0xe0). Each tick, after the model’s pose update, 0x1402513a0 (run from the character tick at 0x14024f128, for local and network-driven characters alike) builds the first body record of the character (record 0 = C + 0x80, the record the target table 0x1404bcb50 points at):

So the point is animated: it follows the hips through crouches, jumps, knockdowns and the lying pose; it is not the feet and not feet + centre height. Rest-pose height of the node over the model origin, from the joint records of our own files (sum of the parents’ offsets, all without rotation, H for the rest pose):

models torso root height (u) head node height (u)
pc00a, pc04a, pc07a 11.261 17.044
pc03a, pc05a, pc09a 11.261 18.133
pc01a, pc06a, pc10a 12.111 17.947
pc02a 11.123 16.265
pc08a 11.554 16.696

(The standing idle is close to the rest pose; the exact standing value comes from the stance animation’s hip track and was not measured.)

Joint index per model (fixes 11-13, H): the packed id 0x4D1D1710 sits in joint record 9 of pc00a.alr (parent 8; the right hand 0xADB07630 is record 38, the head record 57) and in joint record 3 of enm12a0.alr (parent 2; right hand 28, head 42). The converter keeps the record order (joint_N = record N), so the rest heights of joint_9 / joint_3 in our converted models (11.261 / 12.249 u) are the torso root’s.

Who uses which point (all read in the code):

use point
lock grade distance, camera lock yaw / pitch, switch-target sort key body point of both sides (record + 0x60)
CPU sight pair 0x4075 (0x14012a960 → 0x1401641b0) body point of both players
locked aim: cast pitch / yaw (0x140258407..), the shots’ steering target, multishot and parabola aim points the target’s body point (record + 0x60); the caster’s end is the caster’s feet + centre height (C + 0x12E98, 9 u)
melee / pursuit hit test (0x14026c340) target body point, radius record + 0xb0; the line of sight starts at the caster’s feet + centre height
CPU shot threat 0x40BA the CPU’s feet + centre height (C + 0x12E98) with radius C + 0x12E9C, not the body point
CPU built-in at 0x140210650 (the same threat test for a target-table entry) that entry’s body point and radius (record + 0x60 / + 0xb0)
body push, wall capsule, floor pick feet + h / 2 and the height / width columns
touch list (movement step, slot 0x80) body point, radius C + 0x130

So a locked straight shot leaves from about the caster’s 0.9 m centre toward the target’s hip node at about 1.13–1.21 m (standing), and follows the target down when it is knocked flat. Correction to “Rules shared by all kinds”: the hit test’s target radius (record + 0xb0) is the character table radius, 5 u for the playable cast (the text said 10 u; this writer is the only one found for record 0, M).

Implementation notes for the rebuild