Home / Forums / Drawing Bullet Tracer Trajectories from Muzzle to Hit Impact in 3D Space

UnreliableCode Community

Developer Research, Reverse Engineering & Coding Community

Source

Drawing Bullet Tracer Trajectories from Muzzle to Hit Impact in 3D Space

VMT_Hooker
VMT / Detours Engineer
VIP
Rep: 310
Join Date: Mar 2023
Posts: 22
Thanks: 80
4y ago · Jan 10, 2022 8:12 PM
#1
Recording bullet spawn origins and hit positions to render fading 3D beam tracers in DirectX and ImGui.
VMT_Hooker - Virtual method table swapping made easy
The following users thanked VMT_Hooker for this post:
KernelDiver
Kernel & Systems Researcher
VIP
Rep: 275
Join Date: Jan 2024
Posts: 24
Thanks: 70
4y ago · Jan 10, 2022 10:59 PM
#2
Store tracer struct with startPos, endPos, spawnTime, and duration. In the render loop, interpolate alpha from 1.0 down to 0.0 over lifetime.
KernelDiver · Windows Internals & Page Tables
AsmDisasm
x86_64 Disassembler Dev
MEMBER
Rep: 145
Join Date: Feb 2025
Posts: 23
Thanks: 36
4y ago · Jan 11, 2022 1:59 AM
#3
Drawing a 3D cylinder or quad beam aligned with the view direction creates realistic tracer rounds.
AsmDisasm · Zydis & Opcode Length Disassembly