Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Position Vector Offset

  • Position Vector Offset

    Posted by Jamie Bradshaw on July 8, 2009 at 7:37 pm

    Hi all.

    I think this should be obvious but my head is a bit fried from work at the moment.

    I’m looking for an expression that offset’s a 3D layer’s position along it’s local Z-axis by a certain amount (determined by a Slider).

    So is there an easy way to determine this if I have the following:

    pos1 = transform.position;
    orient1 = transform.orientation;
    posOffset1 = effect(“posOffset”)(“Slider”);

    Thanks,
    Jamie

    JimJam•Graphics
    https://www.jimjamgraphics.com/

    Dan Ebberts replied 16 years, 10 months ago 2 Members · 1 Reply
  • 1 Reply
  • Dan Ebberts

    July 8, 2009 at 11:35 pm

    This should work under most conditions:

    posOffset1 = effect(“posOffset”)(“Slider”);

    v = toWorldVec([0,0,1])*posOffset1;
    if(thisLayer.hasParent){
    value + parent.fromWorldVec(v);
    }else{
    value + v;
    }

    Dan

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