1개월 전 · Jul 3, 2026 5:52 AM
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;
}