Developer knowledge network · moderated exchange

UnreliableCode コミュニティ

開発者リサーチ、リバース エンジニアリング、コーディング コミュニティ

Tutorial

Grenade Trajectory Prediction Physics with Collision Normals & Bounce Elasticity [v2.4 Technical Discussion]

matrix_math_guy
Math Specialist
MEMBER
担当者: 105
参加日: Aug 2018
投稿: 52
ありがとう: 41
1 か月前 · Jul 20, 2026 5:01 PM
#1

Simulating CS2 smoke, flashbang, and HE grenade trajectories:

  1. Initial grenade throw velocity:
    $$V_0 = \text{EyeAnglesToVector}(\text{pitch}, \text{yaw}) \times \text{ThrowPower} + \text{PawnVelocity} \times 1.25$$
  2. Each physics simulation step ($dt = 0.015625\text{s}$):
    $$P_{t+1} = P_t + V_t \cdot dt$$
    $$V_{t+1} = V_t + (0, 0, -800.0) \cdot dt$$
  3. On surface collision trace hit:
    $$V_{\text{bounce}} = (V_t - 2(V_t \cdot N)N) \times 0.45$$

Rendering the resulting 3D polyline with ImDrawList::AddPolyline displays the exact landing zone before releasing mouse button!

imgui_artisan
UI Designer
MEMBER
担当者: 202
参加日: Apr 2019
投稿: 54
ありがとう: 28
1 か月前 · Jul 20, 2026 8:09 PM
#2

The bounce reflection formula with the 0.45 elasticity coefficient matches the Source 2 grenade physics perfectly!

raycast_ryan
Ballistics Dev
MEMBER
担当者: 72
参加日: Sep 2019
投稿: 32
ありがとう: 16
1 か月前 · Jul 21, 2026 6:00 PM
#3

Lineups for Mirage window smoke and Inferno B CT smoke become 100% consistent.