ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

# math: rotation with offset

FAQ   •   VIEW ALL
 math: rotation with offset on Apr 14, 2015 at 1:47:31 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?

 Re: math: rotation with offseton Feb 20, 2018 at 11:03:36 am

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