Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions X rotation affects toWorld/toComp properties

  • X rotation affects toWorld/toComp properties

    Posted by Crystal Qn on March 4, 2022 at 3:07 am

    I have been trying to get the world coordinates of a 3D Layer, everything has worked as intended but when I animate the 3D layer’s X rotation, that affects the Y and Z axis numbers in toWorld(anchorPoint).

    I have added another expression for the anchorPoint to always be in the center of a layer, so probably it should not be moving?

    Is the only solution to make another layer that’s parented to said 3D layer, or am I missing something?

    Crystal Qn replied 4 years, 5 months ago 2 Members · 2 Replies
  • 2 Replies
  • Dan Ebberts

    March 4, 2022 at 3:48 am

    What’s the expression for the anchor point?

  • Crystal Qn

    March 4, 2022 at 4:17 am

    boxTop = thisLayer.sourceRectAtTime(time).top;

    boxHeight = thisLayer.sourceRectAtTime(time).height;

    boxLeft = thisLayer.sourceRectAtTime(time).left;

    boxWidth = thisLayer.sourceRectAtTime(time).width;

    [boxLeft + boxWidth/2, boxTop + boxHeight/2 ];
    —————

    Been fiddling and I stumbled the solution to my issues, I just had to add the 3D layer’s anchorPoint into toWorld() instead of adding on top of it

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