Hello, I have a game where there are projectiles that have bullet drop. The projectile does not use the game physics or gravity, instead i have a module that calculates where the projectile should go. I want to have a beam to show the trajectory of the projectile with a beam, but ones that I found don’t line up exactly because they use workspace.Gravity in their formula. How do i make a beam out of several 3d points or just use the formula? Thanks!

Posts I’ve tried:

Does not work well because it uses gravity in its formula.

Does not work either it points straight down for some reason.

Oh I forgot to mention it has bullet drop, I have code to simulate gravity in a way that makes the bullet fall down but I want to have a beam to show the trajectory of it. How do I do this?

I belive using the cframelookvector then minus it with vector3 y value. It should look like this
Cframe.new(position+lookvector,position+lookvector-Vector.new(0,gravity,0)
The more gravity it is the more faster it will drop to the ground

I tried it, but it lags a lot because each time where will be around 1k beams in workspace and every second 60 beams are created. Also everytime the player moves their mouse it will have to do it all again. So I’m not sure how I can do this without having performance issues. Is there a way to do it all in one beam? Maybe using math to calculate the curvesize 0 and curvesize 1

Use a table to virtually map out the bullet as if it were moving and map each point to the table. So you should have a table of cframes. Use that to illustrate your trajectory.

I manage to solve the problem. I just had to iterate through a table of Vector3 values and create beams through them with a CurveSize1 of the difference between the Y value of attachment 0 and the Y value of attachment 1.