Developer knowledge network · moderated exchange

Супольнасць UnreliableCode

Супольнасць распрацоўшчыкаў даследаванняў, зваротнага праектавання і кадавання

Knowledge indexжыць
4Categories
919Threads
2.8KПаведамленні
Guide

Kraber & Sentinel ballistic trajectory lead prediction math

apex_kraber_god
Member
MEMBER
прадстаўнік: 178
Дата далучэння: Jul 2022
Паведамленні: 7
Дзякуй: 86
1 месяцаў таму · Jul 1, 2026 5:07 AM
#1

Physics formula for 500m sniper shots in Apex Legends:

CPP
Vector3 CalculateApexLead(Vector3 muzzlePos, Vector3 targetHead, Vector3 targetVelocity, float bulletSpeed, float bulletGravity) {
    float dist = (targetHead - muzzlePos).Length();
    float time = dist / bulletSpeed;
    
    // Account for acceleration if target is sliding/jumping
    Vector3 predictedPos = targetHead + (targetVelocity * time);
    
    // Gravity constant in Apex is 750.0f units/sec^2
    float gravityDrop = 0.5f * (750.0f * bulletGravity) * (time * time);
    predictedPos.z += gravityDrop;
    
    return predictedPos;
}

Kraber bulletSpeed = 29500.0f, Sentinel bulletSpeed = 31000.0f.

raycast_ryan
Ballistics Dev
MEMBER
прадстаўнік: 72
Дата далучэння: Sep 2019
Паведамленні: 32
Дзякуй: 16
1 месяцаў таму · Jul 1, 2026 7:25 AM
#2

Tested on firing range moving targets from 450 meters away: 100% headshot accuracy.

matrix_math_guy
Math Specialist
MEMBER
прадстаўнік: 105
Дата далучэння: Aug 2018
Паведамленні: 52
Дзякуй: 41
1 месяцаў таму · Jul 1, 2026 7:09 PM
#3

The 750.0f gravity constant matches engine dumps perfectly.