CMovement::FollowSpline
function · collision · primitive
- Address
0x7c5490· 1005 bytes, up to0x7c587c- Signature
uint32_t __thiscall (CMovement *this, uint32_t now, float *out)- Meaning
- Samples the spline at now, sets direction, facing, pitch or bank, and writes the point minus the anchor
- Confidence
- inferred
- Finding
- collision/kinematics#spline-follower
- Test
collision::spline_follow_frac1,collision::spline_follow_frac2,collision::spline_follow_facing_wrap,collision::spline_follow_turn,collision::spline_follow_mat3_mul_vec,collision::spline_follow_relative_out
Finding: Spline follower in collision: kinematics
0x7c5490(now, out) returns flags & 0x200f without writing when +0x40 has no bit of 0x3, and
1 without writing when the spline's +0x18 bit 31 is set. Else it sets the spline's +0x20 to
now − +0x1c and its progress u: 1.0 for a zero duration +0x24, 0 for a negative elapsed
time, 1.0 (setting +0x18 bit 0) at or past the duration, else fl(elapsed/duration). It
evaluates the curve at u, writes the tangent to +0x5c and +0x1c = atan2(ty, tx) (+2π when
negative), and returns out = point − anchor and 1. Swimming, +0x20 = fl(asin tz); else, with
spline bit 0x200, it rolls +0x24 about the tangent by a bank toward the point 1000 ms ahead.
The derivation is in the doc.
Callers 1
- CMovement::GetSplineStep collision
Callees 7
- EvaluateSplinePoint spline
- EvaluateSplineFrame spline
- Vector2LengthSquared spline
- __CIasin crt
- __CIacos crt
- BuildAxisRotation cmath
- CMovement::TransportToWorld collision
Calls and jumps by a bare address, from tables/calls.tsv.