Download

Bullet Tracers System

Hey folks,

in the last days i searched for a tutorial to build some bullet tracers. However i couldn´t find anything which satisfied me, so i tried to do it myself. This project is beyond perfect and im pretty new to Unreal Engine, if you have any suggestion feel free to comment!

NOTE: I use the FPS starter content!

Well here we go:

So first thing i did was creating a material for the bullet tracer actor. Pretty simple material:

Base Color: RGB(0.87,0.3,0)
Emissive Color: RGB(8.7,3.0,0)

263ac99497f807d9eaefeb6b479b0fde3531dcb5.jpeg

Second thing is to create the actor. just create a new blueprint actor and add a sphere and projectilemovement to it. Dont forget to apply your material to it!

Scale of Sphere: x=0.04 y=14.5 z=0.04
Location of Sphere: x=510 y=0 z=0
EDIT: Set Collison to NoCollision

e54874e67a8b33d0d696eeb8631dc7e0051298f2.jpeg

Now you have to configure your Projectilemovement!

i gave it a Maxspeed of 20 000 but you can fiddle around with it. Also give it the same initial Speed and 20 000 velocity in x direction.

c4e9780d5c0b96dd69021eeea7b3857d0d2800c5.jpeg

in the event graph on your bullet tracer actor add to EVENT BEGIN PLAY a delay of about 1 sec (should be enough for a bullet tracer) and then destroy it!

Now that we have our Actor we only have to spawn it:

Go to your FirstPersonCharacter Blueprint and look for InputAction Fire. There we wanna spawn our bullet tracer actor after the animmontage. Just change the blueprint to make it look like this:

3167bcb614b058ad9cf6b6d0d1216b32823470ec.jpeg

I also added a LineTrace you can use this e.g. for hitreg.

This is what it will look like ingame:

Have fun with it :slight_smile:

I can be wrong but one thing:
Don’t use a delay node, but use Tick Event + a timer variable to destroy the bullet automatically.
Afaik Latent functions such as Timers and Delay nodes create new Threads.

isnt Tick Event depending on your fps?

if you use delta, it is frame independent

thanks i will try that out, wont post it here tho since this is also working :slight_smile:

FYI - Delay nodes do not use separate threads and are easy to use.

LatentActionManager is used to tick all the pending actions every frame. The delay node simply checks to see if it is expired and then triggers the execution pin if it has.

If you want to create your own :
http://www.casualdistractiongames.com/single-post/2016/05/15/Creating-Latent-Functions-for-Blueprints-in-C