Creative Communities of the World Forums

The peer to peer support community for media production professionals.

  • Posted by Dotan Stern on April 23, 2009 at 6:39 am

    Hi how do i get this thing going its a pian to do it manualy and im sure it is possible by expressions
    here is what i wanna do
    lets say i have 3 (i have more) solids (videos) all at the same poistion covering each other
    now i want the first one(red color) to rotate 180 on x then the second one (blue color) to rotate -180 from the position of the red solid and then the third solid (green color) to rotate 180 from the position of the blue solid

    i guess something to do with this :
    delay = .5;
    parent.transform.xRotation.valueAtTime(time – delay)

    but how do i set it right and how i control that one go 180 and the other goes -180?
    is that a chalenge???
    thanx guys in advance

    Ben Rollason replied 17 years ago 2 Members · 3 Replies
  • 3 Replies
  • Ben Rollason

    April 23, 2009 at 9:21 am

    If I understand you correctly, you’re trying to get the video layers to concertina out. They start stacked and they fold out as though they were one long strip?

    One method is to stack all of your layers on top of one another, then change their anchorpoints to alternating sides. The first layer would have its anchor point on the far left for instance, the second on the far right, the third on the far left again and so on. The position will need to be adjusted after this so that the layers sit on top of one another again.

    The anchor point represents the hinge where the layers attach to one another.

    Next, starting at the top layer, make it the child of the layer beneath and so on right down to the bottom.

    Put the following code into the yRotation property of each layer except the bottom one.


    thisLayer.parent.transform.yRotation *-1;

    Now when you rotate the lowest layer, all the layers above will rotate too, but in alternating directions and as the layers are parented to one another, the stack will appear to fold out.

    Ben.

    http://www.benrollason.com

  • Dotan Stern

    April 23, 2009 at 9:44 am

    Thanx ben
    its not exactly what i meant but it helped me figure it out
    i used this expression
    delay = .5;
    parent.transform.yRotation.valueAtTime(time – delay) *-1
    after aligning the anchor point of the layers
    it was quite easy
    is there also a way to change the anchor point for one layer to the left side and the other to the right side and so on automatic?
    just trying to save some more time using expressions 🙂

  • Ben Rollason

    April 23, 2009 at 1:51 pm

    You could do, but then you’d have to set variables to tell it which side to set the anchor point…then adjust the position accordingly. Unless you had masses of layers, it would be just as time consuming.

    http://www.benrollason.com

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