Complex problem, trying to trail a tracer behind a very fast moving bullet, bullet too fast for trail

Been struggling with this for a while now

I’ve been working on trying to introduce (or rather improve) a tracer effect for a gun system I have been working with, there is an trail attachment for the bullet existing so that it does have a tracer effect, but it has to reach a certain distance before its visible…

I’m under the impression that the bullet moves so fast that the tracer trail “activates” or is visible until a certain distance away from the muzzle (a large distance mind you), I want to make it so that the tracer is visible from the moment the bullet exits the muzzle but this has not been possible for me. I’d really like some tips towards solving this.

perhaps a better theory is that the tracer doesnt show up at closer ranges because the bullet gets destroyed so quickly?

edit: this theory is correct, how can I circumvent this?

I’ve never worked with this type of system, so the following ideas are just my opinions.

I think trails are one of the items that is rendered later than others for performance issues. I don’t know if this can be changed though.
What is your bullet speed and what is your trail speed set at?
Are you loading the bullet with the trail in it, and then shooting it, or are you cloning/creating it only when the gun fires? This may cause a bit of lag which would affect the trail as well.

The bullet has a force impulse applied utilizing direction and muzzle velocity (upwards of 1000+ towards the intended direction), The bullet is instance.new’d and so is the attachments and trail

I tried having the bullet with trail loaded already but there was some terrible bug occurring with it so I stopped that

I tried to utilize a clonedbullet and tween the clonebullet across the obtained path segments of raycasts but it was laggy when multiple shots are being fired so not a good thing (but otherwise it was functioning almost how I wouldve liked it to be)…

edit: ultimately will just stick with what I got i guess, it’ll just have to be an unintended feature

I could also just make a neon part generated at each interval path :person_shrugging: it could work but may look ugly

It seems like your bullet is firing off before the trail is created (this assumes your bullet is actually originating in the gun). What was the issue when you create the bullet with trail and attachments and keep this in replicated storage, and just clone this bullet when you need it… adding an new instance of velocity to fire it?

1 Like

Probably shoddy work on my end, I did a shortcut and used a copied instance of an already ejected bullet, I’m gonna try to be in studio mode and manually create the bullet and try it again see what occurs

when I tried the shortcut way, the bullet was farther away and not ejecting from muzzle prob had remnants of previous impulse

*edit: same normal effect happens, trail isnt visible until reaching certain distance

I’ve thought about making a clone of the bullet, and predicting the end of point of the bullet projectile and mimicing the bullet physics on the clonedbullet, but reducing the velocity (so muzzle->end point tracer is shown) but not sure how to accomplish that–I could probably determine the end point prediction–just not sure how to manipulate forceimpulse and bodyforce to compensate because If i just change the velocity(reduce it), the tracer round will not follow the intended target

@RMofSBI
yes it works as intended

When you manually move the bullet in studio using the move tool, does the trail work as intended?

calculations for bullet physics:


	local BulletMass = Bullet:GetMass()

	local Force = Vector3.new(0,BulletMass * (196.2) - (WeaponData.BulletDrop) * (196.2), 0)



	Bullet:ApplyImpulse(Direction * WeaponData.MuzzleVelocity * ModTable.MuzzleVelocity)

	local BF = Instance.new("BodyForce",Bullet)


	Bullet.CFrame = BulletCF

	BF.Force=Force

The issue was with render i.e. in 60 fps, the bullet goes to fast, but in higher fps you can see it from muzzle to end.

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.