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)
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
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.
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:
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