Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions little swing rotation on car mouvement

  • little swing rotation on car mouvement

    Posted by Guillaume Charron on January 25, 2011 at 9:27 pm

    I want to simulate the suspension of a car… When the car stops I want to make the body of the car to rotate a little bit towards the front. And when it accelerate I want the car to rotate towards the back a little bit.

    For the wheels I already have the expression to make them rotate base on the x pos of the car (see code below).

    The difference is that the wheels will be parented to a null and the car to the same null so I can rotate the body without moving the wheels.
    I hope I’M clear enough. 🙂

    Anyway, my guess is there will be a if/else expression for the rotation of the body but I don’t know how to tell when to stop and when to start the rotation.

    If someone can help… thanks in advance. 🙂

    d=width;
    pi=Math.PI;
    circ=d*pi;
    rot =360/circ;
    movex=thisComp.layer(*layer*).transform.position[0];
    scaler=thisComp.layer(*layer*).transform.scale[0]/100;
    rot*movex/scaler

    Andy Sapp replied 14 years, 6 months ago 3 Members · 2 Replies
  • 2 Replies
  • Trent Armstrong

    March 8, 2011 at 7:40 pm

    Hi! I think you might need to explain this in a little bit more detail. And include exactly what you’re trying to accomplish with the new expression.

    Thanks

    Trent Armstrong – Creative Cow Leader
    https://www.dallasaeug.com

  • Andy Sapp

    October 21, 2011 at 6:50 pm

    I understand what you are trying to do. When the car stops, you want a touch of momentum to shift the weight (rotation) of the car forward and then settle… just like when I car stops in real life. The problem is, you don’t want the wheels to perform that rotation with the car. You basically want the car to rotate independently.

    I am actually trying to do the same thing. If I figure it out, I will post more.

    Andy Sapp
    http://www.andysapp.com

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