Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions math: rotation with offset

  • math: rotation with offset

    Posted by Michael Chlebusch on April 14, 2015 at 1:47 pm

    Hi,

    I turnded my google upside down but no solution turned up. What I need to do is:
    Animate a globe with a marker above certain locations. For example: I want an icon hover above Paris and be free to rotate the globe with the icon staying above paris.

    What I tried:
    Having a null’s rotation linked to the rotation of cc sphere then link my icon to the null with its anchorpoint set off by a distance slightly bigger than the spheres radius. Works like a charm AS LONG AS paris would be located right at the equator. When I position my icon anywhere else by simply adding any offset to the null (to get it where paris is located), the icon rotates strangely along the sphere, like its axis is turned a few degrees relative to the spere’s. The bigger the sphere (my radius is 1720) the bigger the visible effect. It comes back in place after a 360 degree turn though.

    Here’s the expression I used with the null:
    – transform.xRotation+thisComp.layer(“globe”).effect(“CC Sphere”)(“Rotation X”)*-1
    – transform.yRotation+thisComp.layer(“globe”).effect(“CC Sphere”)(“Rotation Y”)*-1
    – did not use z-rotation, which messes up the whole thing even more

    It seems to be a mathematical problem on when the position of the icon is added to the rotation of the sphere but since I had my MA in arts I have no Idea how to solve this. I think it might be a solution to add the icon’s x- and y-position AFTER the spheres x- and y-rotation has been done to the null, but it seems to be not possible to do that in AE.

    Can anyone help to figure out the numbers?

    Michael Chlebusch replied 8 years, 2 months ago 2 Members · 2 Replies
  • 2 Replies
  • Constanti Dinu

    February 20, 2018 at 11:03 am

    any luck on finding the solution? i’m on this problem myself

  • Michael Chlebusch

    February 20, 2018 at 11:52 am

    Sadly I could not find out how to do it.
    I wanted lets say, have a marker on Tokyo and New York and do a quick rotation from one to the other. While hovering over one marker the globe kept rotating very slowly.
    I ended up placing my map markers by hand to appear only after the globe had slowed down, animate them during the slow rotation with keyframes, make them vanish and rotated to the next. Was not what I wanted to do but was okay in my case.

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