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