Skip to main content
Known Participant
September 9, 2020
Question

Prevent Object Flipping AE

  • September 9, 2020
  • 2 replies
  • 2598 views

I am using a train to follow a path created in a shape layer.  The train keeps flipping on what appears to be the axis around corners after I pick "Auto Orient, Orient along Path".   I have enclosed the example. 

 

Is there a way to prevent this?

 

This topic has been closed for replies.

2 replies

Community Expert
September 9, 2020

Is it necessary for the train layer to be 3D?

 

You are experiencing Gimbal Lock because the motion path is in the X, Y plane. You can eliminate this problem if you add a 3D null to the scene, parent all the 3D layers to the null including the camera to the null, rotate the null -90º in X, then release the parenting. The camera is now pointing straight down, the motion is confined to the X, Z plane, and the gimbal lock that is causing your layer to flip over when you orient along the path is gone. You just have to rotate the Train layer -90º in X and if needed 90º in Z. That's all there is to it.

You could also copy the motion path to a null layer, set up a position, and a look at expression to point the train layer at the null, but that's a lot more work. 

 

 

 

Mylenium
Legend
September 9, 2020

Perfectly normal. That's that old Euler vs. Quarternion thing. It's called "auto-orient(ation)" after all and behaves the same as the respective property on 3D layers therefore. There are several expression-based solutions for this in volving defining a custom "up-vector" and there are canned script solutions on AEScripts.com as well. Check this stuff out in a quick visit or web search and pick your favorite

 

Mylenium

Known Participant
September 9, 2020

What keyword would you recommend for that under that site?