CMovement::GetVelocity
function · objectlayer · primitive
- Address
0x61eec0· 48 bytes, up to0x61eeef- Meaning
- Returns a mover's velocity: its speed times its direction
- Confidence
- verified, proof one
- Finding
- objectlayer/missiles#aiming-and-leading
- Test
objectlayer::missile_scale_vec_difftest
Finding: Aiming and leading in objectlayer: missiles
0x61d230 sets the destination. The aim point is the target's attachment, or its position raised
by 0.75 of +0x90·+0xbc. A missed missile flies half a second past the aim point, turned by a
random angle up to 3° about the horizontal axis across its path. A missile at a unit leads it: with
v half the target's velocity, capped first at the missile's speed s, and r the aim point
from the missile, it takes the least positive root of (|v|² − s²)t² + 2(v·r)t + |r|² = 0 and
aims at aim + v·t; with no positive root, a negative discriminant or a near-zero quadratic term
it aims at the point itself.
The derivation is in the doc.
Callers 2
- CMissile::Aim objectlayer
- SampleWeatherMotion lighting
Callees 0
None by a direct call or jump.
Calls and jumps by a bare address, from tables/calls.tsv.