I have a particle output (an exhaust fume effect) attached to a motor of a plane. The motor is out on the edges of the wings of this plane, so when the plane rotates, the motors do as well. Thus, the particle output velocity needs to rotate to match the motor's pan. The achieved effect is a particle output that shoots directly straight out of the motors no matter what rotation they are at.

The variables I have to work with are this:

Location - A static variable because the location of the particle output is always at the motors "exhaust".

Velocity - A local vector. If my plane is going forward with no rotation, a velocity vector would look like this: vector(-5,2,2). This works because the X acceleration is -5 and my planes "motors" are aligned along the X line. But what if my planes "motors" are aligned along the Z line? Or somewhere in between. You need a complex vector derived the calculate the X, Y, and Z velocities based on the ships pan.

The desired effect is a particle effect that shoots straight out in the direction directly opposite from the planes rotation.

I'm hashing out algorithms now but I need some help. I'll edit this post if I think I'm on to something. I had a similar post but the info was spread out on two pages and I needed some fresh input. Thank you very much!