Hello, :hello:
I'm trying to express an engine exhaust direction in a normalized way. But I'm not sure of the formula. To be correct, the Z component must take into account both X and Y components.
pitch_angle : the angle the nozzle will make from the center position (yaw and roll).
yr_angle : the angle the nozzle will make from the center position (yaw and roll).
Thanks a lot, its quite important for me to be 100% certain of that formula. :tiphat:
---------- Post added 07-11-12 at 12:20 AM ---------- Previous post was 07-10-12 at 07:18 PM ----------
Well, here's what I found... it seems to work, as the sum of all the vector components remains equal to 1.
I'm trying to express an engine exhaust direction in a normalized way. But I'm not sure of the formula. To be correct, the Z component must take into account both X and Y components.
pitch_angle : the angle the nozzle will make from the center position (yaw and roll).
yr_angle : the angle the nozzle will make from the center position (yaw and roll).
SetThrusterDir (th_main[0], _V(+cos(yr_angle*RAD), +cos(pitch_angle*RAD), sin ???));
Thanks a lot, its quite important for me to be 100% certain of that formula. :tiphat:
---------- Post added 07-11-12 at 12:20 AM ---------- Previous post was 07-10-12 at 07:18 PM ----------
Well, here's what I found... it seems to work, as the sum of all the vector components remains equal to 1.
vector.z = 1 - (cos(pitch_angle*RAD)+cos(yr_angle*RAD))