How can i improve my bullet trail?

Hello, i’m making an FPS framework, in low-poly style. It is going great, i love it, but i still can’t figure out a good way for bullet trails. I use a trajectory module built by me some time ago, and it is good: you create a data-packet which contains all the data of the gun shooting, and then just call the fire function with the data-packet and some other things as arguments. The fire function takes those data and put it in a dictionary, and connects the update function to renderstepped, and give as argument the dictionary containing the shooting data. The update function calculates the trajectory, and then sends the results to another function which updates the CFrame of 2 attachments per bullet that are the attachments 0 and 1 of a beam.

This is the current result: glock17 trail clip

Beam properties:

Beam:

Place: Scefrom's FPS Module Test-Place - Roblox

1 Like

It might be a bit too thick for a 9mm bullet. Also minor nitpick, are you sure that is a glock 17?

2 Likes

Yes, actually it is a bit too thick, as you said, so thanks, i’m going to change it.
About the pistol, it should be a glock17, but i changed it to “auto” so that it would be easier to see bullets.
The glock model is made by @Alex25Torres, and i’m planning to change it.

1 Like

I think i finally found a good way to fix my bullet trails.
in addition of changing color, size, and texture to the trail (because i decided to use trails instead of beams), i also modified the update which updates attachments’ cframe:

local m = cf(self.o,self.d)
local wt = self.wt+((self.o-camera.CFrame.p).magnitude^2*1e-05)*.5
self.a1.CFrame = m*cf(0,wt,0)
self.a2.CFrame = m*cf(0,-wt,0)

cf is just the function CFrame.new under local

self.o is the new position
self.d is the velocity of the bullet (vector3)
self.a1 is the Attachment0 of the trail
self.a2 is the Attachment1 of the trail
self.wt is the width of the trail (currently set to 0.3)

Basically it just changes the trail width basing on the distance between the new position and the camera position. At first i believed that this type of system was just a waste of time, but actually that’s better than thought.

https://gyazo.com/248c401b8b69c6a30609108429b056c4
https://gyazo.com/0ae6a6558144863098c682eb39cccbba

this time the gun is the mac10, which model comes from toolbox, but thats only for testing

Also, it creates a way nice projectile fading system: https://gyazo.com/bdb134845c496f7c55dac92d534a61bd

glock17 ^^^ (auto mode, as they are more visible)

4 Likes

https://i.gyazo.com/b7201dce3400c2fb9e0dd245de5af03c.mp4
fps unlocker moment

1 Like

(Post deleted by the author…)

pls can you create the map for mobile ???

Oh my god, lol.
That’s because the spring’s damping is somehow connected to the fps. I will try to fix that.

All the gun models (except the glock17 one) are taken from toolbox, but i will remove free models on the released game

Maybe soon, or maybe never, i have to decide.

1 Like