Developer knowledge network · moderated exchange

UnreliableCode Topluluğu

Geliştirici Araştırması, Tersine Mühendislik ve Kodlama Topluluğu

Knowledge indexCanlı
4Categories
919Threads
2.8KGönderiler
Analysis

Kraber & Sentinel 500m Ballistic Trajectory Math: Bullet Gravity & Velocity Decay [v2.4 Technical Discussion]

matrix_math_guy
Math Specialist
MEMBER
Temsilci: 105
Katılım Tarihi: Aug 2018
Gönderiler: 52
Teşekkürler: 41
1 ay önce · Jul 3, 2026 5:52 AM
#1

In Apex Legends, weapon bullets have dynamic initial muzzle velocity and gravity scale:

  • Kraber .50-Cal: muzzleVelocity = 29500.0f (approx. 750 m/s), gravityScale = 1.0f
  • Sentinel Charged: muzzleVelocity = 31000.0f, gravityScale = 0.85f
  • Longbow DMR: muzzleVelocity = 30500.0f, gravityScale = 1.0f
CPP
Vector3 CalculateBallisticLead(Vector3 targetPos, Vector3 targetVel, Vector3 localEye, float muzzleVel, float gravScale) {
    float dist = (targetPos - localEye).Length();
    float timeToTarget = dist / muzzleVel;
    // Lead position along target movement vector
    Vector3 predictedPos = targetPos + (targetVel * timeToTarget);
    // Compensate bullet drop
    predictedPos.z += 0.5f * 750.0f * gravScale * (timeToTarget * timeToTarget);
    return predictedPos;
}
apex_glow_god
Apex Reverser
MEMBER
Temsilci: 128
Katılım Tarihi: Dec 2020
Gönderiler: 8
Teşekkürler: 30
1 ay önce · Jul 3, 2026 8:13 AM
#2

Tested this formula with Kraber at 450m: landed a clean 145 damage body shot on a running Wraith!

raycast_ryan
Ballistics Dev
MEMBER
Temsilci: 72
Katılım Tarihi: Sep 2019
Gönderiler: 32
Teşekkürler: 16
1 ay önce · Jul 3, 2026 6:14 PM
#3

The 750.0f world gravity constant matches the Apex physics engine.