Particle Rotation To Curve Tilt?

Hi All,

I am using a script to trace particles and generate a curve. Then I add an empty to the scene with a constraint to follow the curve. this works fine, but when I visually compare the particles vs the newly generated Empties traveling along the curve I notice the Empties do not tilt. This is because my script does not set the tilt value for the curve, thus the travelers along the curve do not rotate.

Does any one know how to convert the particle rotation, which is three values into a valid curve tilt which is a single value? Would I just extract the forward axis and use that value?

In the image, the red ships are my generated empties. The blue ships are the boid particles I am trying to match. Notice the red ships do not tilt/rotate.

Attachments