FORUMS: list search recent posts

# little swing rotation on car mouvement

FAQ   •   VIEW ALL
 little swing rotation on car mouvement on Jan 25, 2011 at 9:27:15 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```

 Re: little swing rotation on car mouvementon Mar 8, 2011 at 7:40:36 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
http://www.dallasaeug.com

 Re: little swing rotation on car mouvementon Oct 21, 2011 at 6:50:17 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