getting rotation after auto-orienting / 180 degree flips

hi all -

i have a 3D object moving along and orienting to a path. i would like to export this tx, ty, and rz data out for some instances to use.

in the attached .tox i have:

  • in red: the original object moving along the path
  • in blue: using an Object CHOP to derive tx, ty, and rz
  • in yellow: using a SOPtoCHOP and arctangent Expression CHOP to derive tx, ty, and rz

The original (red) behaves perfectly, but i can’t get at the data to feed to an instance. The blue and yellow versions flip 180 degrees randomly (gimbal lock?).

is there a way to get the auto orient along path info out directly? or a way to get the blue/yellow versions not to flip?

i started trying to build a sort of gate to block rotation info that changes more than 30 degrees from the previous frame, but that resulted in animation that stuttered.

flipTest.tox (6.65 KB)