Developer knowledge network · moderated exchange

Zajednica UnreliableCode

Zajednica za istraživanje, obrnuti inženjering i programiranje programera

Knowledge indexŽivjeti
4Categories
919Threads
2.8KPostovi
Tutorial

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

matrix_math_guy
Math Specialist
MEMBER
Rep: 105
Datum pridruživanja: Aug 2018
Postovi: 52
Hvala: 41
prije 1 mjeseci · 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
Rep: 202
Datum pridruživanja: Apr 2019
Postovi: 54
Hvala: 28
prije 1 mjeseci · 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
Rep: 72
Datum pridruživanja: Sep 2019
Postovi: 32
Hvala: 16
prije 1 mjeseci · Jul 21, 2026 6:00 PM
#3

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