So i found out how to create a vector2 in 2D using only one angle but now i need a vector3 using two angles
The code i used to get the 2D vector:
function V2ToForce(Angle,Force) local Force = Force or 1 local X,Y = math.cos(Angle)*Force,math.sin(Angle)*Force return X,Y end
I found this formula and some code for testing but acts strange the X works ok but the Y is very glitchy
function Test(X,Y,Force) local x = math.cos(X) * math.cos(Y); local z = math.sin(X) * math.cos(Y); local y = math.sin(Y); return x*Force,y*Force,z*Force end for _=1,360 do Test(math.rad(_),math.rad(_),1) end
Any pseudocode would help.