Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Rotating/Orienting a Wheel on 2 axes

  • Rotating/Orienting a Wheel on 2 axes

    Posted by Mike Foran on March 23, 2013 at 2:33 pm

    I am attempting to rotate a wheel from it center point anchor on the Z axis, while at the same time orienting it from a second anchor at center bottom. I am trying to be able to roll the wheel, but angle it out when it goes around sharp corners by changing the x orientation. The bottom of the wheel should not slide as it rotates.

    I am having a tough time figuring it out. I have built a test comp (which you can see here: https://www.dropbox.com/s/7t4m3zgl63nmfvn/Rolling%203D%20Wheel.2.aep) in which I have my main wheel (blue) which I rotate on the Z axis from the center anchor. I have a controller wheel (red) that shifts it’s anchor point so it can then orient on the x axis.

    The problem, as demonstrated here, is that the main wheel, not sharing the same anchor point, looks like it is sliding away when the controller changes orientation. How can I keep the position of the blue wheel the same as the controller while it rotates and orients?

    Mike Foran replied 13 years, 1 month ago 3 Members · 5 Replies
  • 5 Replies
  • Dan Ebberts

    March 23, 2013 at 6:49 pm

    How about putting a null at the wheel’s contact point, make it the parent of the wheel, and rotate it on its x axis to tilt the wheel out?

    Dan

  • Mike Foran

    March 23, 2013 at 8:03 pm

    I had already discounted this because it felt like to blunt an solution, and it was breaking the other wheel rotation script you wrote in a previous post. But after some finessing this actually worked quite well. Thanks again.

  • Mike Foran

    March 23, 2013 at 9:36 pm

    Ugh. Well every solution poses new problems. All of the wheel questions I have been asking have been are so that I can create a controller for a wheel in Element 3D. So with Dan’s help I now have a wheel controller that automatically rotates nicely along a path and can be oriented from it’s base. Here’s my test project: https://www.dropbox.com/s/0d3jtyll0bpxwpa/Rolling%203D%20Wheel.4.aep

    If you turn off the Element layer (or if you don’t have Element installed) You can see the control wheel(s) are working quite nicely. My problem arises when I try to orient the Element model to match the controller. As you can see it just starts wobbling all over the place when I start to mess with the orientation.

    Can anyone figure why is this happening? This is really the last hurdle.

  • Matt Tillman

    March 24, 2013 at 7:25 am

    I think the wobbling has to do with the rotation order.

    To get around it you need to use both the “Particle Replicator” Rotation as well as the “Particle Look” Rotation.

    Particle Replicator Rotation
    Y = thisComp.layer(“Wheel_Orientation”).transform.yRotation+90
    Z = thisComp.layer(“Wheel_Orientation”).transform.orientation[2]+90

    Particle Look Rotation
    Y = thisComp.layer(“Wheel_Rotation”).transform.zRotation

  • Mike Foran

    March 24, 2013 at 11:00 pm

    Yes, that was it. Thanks so much! this really works and now I can really start animating.

We use anonymous cookies to give you the best experience we can.
Our Privacy policy | GDPR Policy