Forum Replies Created

  • Jaan Koppe

    August 22, 2014 at 7:19 am in reply to: Wheel Rotation On/Off Controller

    Thanks for the code Dan!

    The breaking part works very good, until the brake will be “released”, then the wheel rotation value goes back to the car’s position value.

    I think, that now I need to track the car’s position to get the current x value and apply that when the checkbox is unchecked?

    I added a few lines to the code, got no error’s but also no result:

    need to use some other approach I think 🙂

    tx = comp("Main").layer("Truck").transform.position;
    n2 = tx.nearestKey(time).index;
    if (time < tx.key(n2).time) n2--;
    t2 = tx.key(n2).time;

    cb = comp("Main").layer("CarControl").effect("Break On")("Checkbox");
    if (cb.value == 0){
    tx.valueAtTime(t2)[0];
    }else{
    n = cb.nearestKey(time).index;
    if (time < cb.key(n).time) n--;
    t = cb.key(n).time;
    comp("Main").layer("Truck").transform.position.valueAtTime(t)[0];
    }

  • Jaan Koppe

    August 21, 2014 at 4:40 am in reply to: Wheel Rotation On/Off Controller

    This is the first tyre Rotation expression:

    if (comp("Main").layer("CarControl").effect("Break On")("Checkbox") == 0)
    comp("Main").layer("Truck").transform.position[0]
    else
    0

  • Jaan Koppe

    August 20, 2014 at 6:07 am in reply to: Wheel Rotation On/Off Controller

    Thanks for the Reply Dan!

    For now I have an animation like this:

    https://reels.creativecow.net/film/car-wheel-rotation-test

    Both wheel rotations are driven by the Car’s x value.
    And when the “Brake On” Checkbox is checked, then the First Wheel rotation value is simply 0.

    So i am trying to give the first wheel a constant rotation value which is the current value of rotation. And when the “Brake On” is unchecked, then the Wheel Rotation follow’s the car position x again.

    Jaan

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