Okay so Imma have a weapon in my game, that when fire will draw a line(simular to that of the physgun in gmod) and I was it to be curved, I Will show you a drawing bellow.

Now I need to draw a beam like that with a curve like that, I can do the maths but I dont know how I would go about acctually drawing a line to an object in 3d space, And then also making it curve. Thanks

You define discrete points on your curve and it will define the movement naturally. The last parameter t is how accurate you want the curve. The higher t, the more expensive your curve but the more precise as well.

Since the equation takes A,B,C and D but it returns the path between B and C (look at explanation in the link) the first and last computation will get Vector2.zero for the first parameter (entry point) and for the last parameter (exit point).

For the rest you just pass all values in a array and use a for loop.