Forum Replies Created

  • Well I feel really stupid. I had the target precomp in my main comp twice.

    Removing the duplicate and setting things back to normal (where in the precomp all of the layers were parented together) worked perfectly.. No expression was needed afterall (other than of course the wiggle that I put on there which was, in fact, working correctly)

  • Well, that didn’t solve the problem.. The wiggle on the precomp layer is still moving the 2 layers inside the precomp in different directions.. Strange..

  • I think the problem is that the back layer (with the face cards) had to be rotated on the y axis, 180 degrees (but like I mentioned before I used a flip effect) otherwise when the camera (in the main comp) came around it would be inverted. I am thinking when I get home I’ll invert the image in photoshop shed replace it, remove the flip and hope that the wiggle moves everything the same way after that.

  • Hi again. No, the comp with the target has a layer for the front, a layer for the back and a couple other layers. The front and the back have track mattes to create the holes. This comp is a layer in another comp, the main one. That is where the wiggle is, on the pre comp layer.

    Originally I had the front and back parented thinking that would cover the wiggle but they were moving in opposite directions even then.

    I had the wiggle on x y and z but the main concern is y.

  • Thanks again for your time… I do tend to over complicate things from time to time.. And thank you for helping me to understand but it’s not working.. Here’s a small render of the issue I’m seeing with the below code…

    https://youtu.be/oRaDdXv4r4o

    initialPos = [720, 540, 0];
    wigglePos = thisComp.layer("Tgt_Back").transform.position;
    difference =[wigglePos[0]-initialPos[0], initialPos[1]-wigglePos[1],0] ;

    value-difference

  • Thanks Andrei, that’s basically what I’ve been trying to do but you really helped me with the object model a good bit. One thing I neglected to mention is a small (but important issue).. The front target’s position is: [720, 540, 0]
    And the back of the target is: [648, 316, 1]

    So there’s a delta of: [72, 224, 1]

    So, now I have it so that the front (which is actually the “back” of the target) is bouncing with the wiggle, and the back (what I’m trying to apply the expression on to match the bouncing) is staying exactly where it started out.

    The first expression below is giving me that… (Note, I decided that I want z to stay at 1 no matter what so…)

    So, what I’m thinking is that I need to get the movement that the wiggle is introducing maybe by using ~.position.valueAtTime(time) – ~.position.valueAtTime(time -1) and adding that to my “front” layer..

    I’ve tried a number of ways but I seem to be screwing that up! Maybe just brain dead at this point!

    backOGPos=thisComp.layer("Tgt_Back").transform.position.valueAtTime(0);;
    frontOGPos =thisComp.layer("Tgt_Front").transform.position.valueAtTime(0);

    xDiff = backOGPos[0] - frontOGPos[0];
    yDiff = backOGPos[1] - frontOGPos[1];
    zDiff = backOGPos[2] - frontOGPos[2];

    prevBkPos=thisComp.layer("Tgt_Back").transform.position.valueAtTime(time -1);
    curBkPos=thisComp.layer("Tgt_Back").transform.position;

    xDelta = prevBkPos[0] - curBkPos[0];
    yDelta = prevBkPos[1] - curBkPos[1];
    zDelta = prevBkPos[2] - curBkPos[2];

    x = curBkPos[0] - xDiff + xDelta;
    y= curBkPos[1] - yDiff + yDelta;
    value = [x, y, 1];

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