ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

math: rotation with offset

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Michael Chlebusch
math: rotation with offset
on Apr 14, 2015 at 1:47:31 pm


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?

Return to posts index

constanti dinu
Re: math: rotation with offset
on Feb 20, 2018 at 11:03:36 am

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

Return to posts index

Michael Chlebusch
Re: math: rotation with offset
on Feb 20, 2018 at 11:52:53 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.

Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2018 All Rights Reserved