I am making a function in a scripting language named PAWN
i am trying to do 3d trig, thing is all the tutorials for trig suppose i have the angle i want to put each dimension at, when all if have are these
Code:
Trig3D(Float:x, Float:y, Float:z, Float:radius, Float:tilt, Float:facingangle, Float:angle, &Float:retx, &Float:rety, &Float:retz)
x, y and z are the base position variables (basically it will just add these to the end result)
radius is how big the radius of the circle is, tilt is how much the circle faces up (0.0 = flat, 90.0 = straight up)
facingangle is which way it tilts
angle is which spot on the circle the point is
retx, rety and retz are the variable return slots.
some results i would like to get are:
Code:
Trig3D(0.0, 0.0, 0.0, 3.0, 45.0, 45.0, 45.0, var1, var2, var3)
var1 == 1.5 (or atleast 1.499999999)
var2 == var1
var3 == var1
and
Code:
Trig3D(0.0, 0.0, 0.0, 3.0, 45.0, 0.0, 45.0, var1, var2, var3) //the returned vars should be on the slope of the tilted circle, not on the top or bottom.
var1 == oh wait, the only reason i am here is because i don't know how to get this...
if anyone can help me i will be so grateful.
don't worry about writing examples in a language i don't understand, if it is anything like C i understand it.