So i am intending to make a realistic tracer round projectile. The tracer should leave a yellow trail behind it, and should be able to bounce when having a glancing impact of less than 10 degrees. I tried to make a long emissive mesh to create that tracer trail, but it fails because when it actually bounces off the wall, its no longer pointing the same direction and it flies sideways and it looks stupid.
I am learning particles now so i thought that maybe that is the way…
So my first question is: How to make a realistic tracer? Using meshes or particles?
Second question is about units. When adjusting projectile speed, all i see is numbers. Does it calculate with centimeter per second? I get realistic speeds with really high number.
I am new to unreal engine, not so new at modeling! Thanks for answers!
Units in UE4 is centimeters, so 1 UU (Unreal Unit) is 1 cm. That means you get the speed in cm/s. Divide by 100 to get m/s
I don’t know enough about particles to guide you on that, but it should be relatively simple to do the tracing with a mesh.
If you have the velocity vector of you projectile, you can use Rotation From XVector(you might have to normalize the vector first, I’m not sure). This translates it into a rotation. Set the rotation of your projectile to this value. It should solve your problem with silly movement
Create a cross plane geometry in your desired application or w/e shape you would like to use. Make sure that the geom is facing Y axis. Export to the engine.
Send the geometry to cascade, Make sure it’s facing Y axis, No need to give it speed, If you would like to make trail of smoke etc etc make sure that you give a -Y velocity to the trail or w/e you want it to leave behind.
You should be pretty much ready, What you need is to make sure your crossed quad planes have a good size and a good shader. After you’ve given all of those some trial and error let us know for any more questions.
PS: I cannot stress enough that you do not need to give any speed to your tracer, Just make sure the main emitter is set to local space or any other emitter that you do not wish to use or interact with tracers motion. You will understand that once you’ve tried.
PS2: Check the shooter content they have a tracer example.
Are you using bullet physics? Because you can do something by spawning particles per units of distance behind the bullet; this is the most realistic method. Just create some sort of small dust cloud particle (maybe using SubUV to animate it or randomize it, or just using GPU particles if you want to go super-dense) and have the particle system spawn one particle per every X units of distance travelled by the bullet to create a small dust cloud trail.
Just be aware that if this spawning is on the bullet actor itself, destroying the bullet on impact also destroys the particle system, so you’ll have to spawn the particles separately or instead “stop-and-make-invisible” the bullet on impact to let the particles decay.
Of course that’s if you’re using simulated bullets rather than approximating with traces.