Vertical aim of a cast

Decoded from the Store build 1.3.25854.2 executable (our reading of the machine code). Completes “Aim of a cast” in “Lock-on and targeting”. Angles are the engine’s integer angle units (32768 per turn, 5215.19 per radian); a positive pitch points down. Confidence is M throughout unless marked (read in the code, not yet checked against footage).

Where the stored pitch goes. The cast state S is part of the character object (S = C + 0x12f00), so the cast pitch S + 0x8c is C + 0x12f8c and the cast yaw S + 0x88 is C + 0x12f88. The pitch has exactly one reader: the body matrix build (0x1402514c0, run from the character tick at 0x14024f130 and from 0x14024e4e8). Each tick it makes the matrix at C + 0x12dc0 as

position = (x, feet y + body centre height, z)      (C + 0x12e40.., centre height C + 0x12e98,
                                                     character record field 0x12)
rotation = turn about the vertical by the facing (C + 0x12e68, routine 0x1402906e0),
           then tilt about the body's side axis by the cast pitch (C + 0x12f8c, 0x1402905c0)

and that matrix is what the cast release hands to the skill-object spawn (0x14025c8f8 → 0x1402626d0 → 0x140263a00; also the instant release at 0x140258638). So:

Start point. The spawn replaces the matrix position: when the cast carries a fire-node id (S + 0xc20, ≠ −1) it is the world position of that model node (lookup 0x14018a310; with several matching nodes the shot index modulo their count picks one, 0x140262b30..); else the matrix position stays (the body centre). The spawn copies the matrix to the object (+0x80, position also at +0x68) and stores its heading and pitch as integers (+0xc0 = atan2(forward x, forward z), +0xc4 = atan2(forward y, horizontal length), 0x140263aec..b70). The integer pitch +0xc4 has no reader in the skill code; +0xc0 is read by moving and kinesis.

The pitch value (cast start, 0x140258407..0x14025857d):

Per kind: what the launch frame does (inits in “Skill casting leftovers”):

kind vertical aim
straight (0) copies the spawn matrix whole (0x140264576): flies along its forward axis, pitch included. With a target it then steers in 3-D toward the target point (the capped turn of “Straight behavior”, only inside the 60° cone), so a height difference is covered by the launch pitch plus homing; no lead
ricochet (17) copies the spawn matrix, then applies its record’s spread angles (0x14026af73..b105): pitch included
multishot (6) with a target the base direction is the 3-D direction from the start point to the target point; without one the spawn matrix’s forward axis (pitch included); then the record’s spread angles (0x14026676b..a18)
parabola (1) with a target: aims at the target point and rebuilds its frame from that direction; the vertical speed comes from the arc solve (g = 8H / T², initial vertical speed g·T/2 − Δy / T, “Parabola”), so the pitch is not used. Without a target the landing point comes from a routine not followed (0x14026e410) and only the heading of the spawn matrix is kept (+0x1d0)
fall (2), fast_rain (7), rain (20), hole (15, 16) positioned from the target / caster frame, not from the launch pitch (fall and rain build their own frame; rain copies the spawn matrix for its volley origin only)
crawl (5) copies the spawn matrix, then drops to the floor (floor query 0x14013ef00 at init): floor-hugging; what remains of the pitch was not followed (L)
moving (10), kinesis (11) read the integer heading +0xc0 only: pitch ignored
mine (8), burst (9) position only (and mines never aim: pitch 0 by the cast rule)
melee (13), blade (12), pursuit (3, 14) carried by the attack bone / the caster: no aim at all
auto (4) no projectile

Network. The fire message (type 3) carries the full spawn matrix (f32[16] at 0x10), so the remote shot gets the same tilted frame; nothing else about the pitch is sent.

Camera pitch while aiming (already in “Play camera”): the manual pitch, the lock-on turn and the aim pitch all clamp to the camera record’s two limits (±70° in record 0); while the lock tracks, the camera pitch itself is driven toward the target angle plus the record’s lock offset (0x2C) by at most the pitch step per tick. There is no separate “aiming” mode: the limits are the same with and without a lock.

Implementation notes for the rebuild