Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Forums Adobe After Effects Expressions Linking rotational value correctly to a compass graphic

  • Linking rotational value correctly to a compass graphic

  • Scott Green

    December 2, 2019 at 12:45 pm

    I’ve been racking my brains trying to figure out how to correctly link a number value to a rotating compass graphic (using a basic wiggle) so that the values are between 0° and 360° (or 359° and then it changes to 0 if it’s 360°) rather than using minus values.

    Can anyone help?

    21° is correct.

    -30° is incorrect – this should be 330°.

    Project file:


  • Dan Ebberts

    December 2, 2019 at 4:01 pm

    You could change your rotation wiggle() expression to:

    w = wiggle(0.2,60);
    if (w < 0) w += 360;

    and remove the “-” from your text expression.


  • Scott Green

    December 10, 2019 at 7:51 am

    Sorry for the late reply Dan, the notification ended up in my spam folder.

    Thanks for the info, but I’m not quite getting the result I was hoping for.

    I think that the solution might be to try and link the Source Text property to the 2nd value of the Rotation Property, but to ignore the “1x” value and the “-” value.

    For example…

    …ignore “0x” and ignore “” to give 15°.

    …ignore “0x” and ignore “” to give 359°.

    …ignore “-1x” to give .

    …ignore “-1x” to give 30°.

    Does that make more sense?
    Would that be possible?

    The wiggle was used just to test it out. I’ll probably be keyframing these values manually but with a bit of wiggle added.

    Many thanks.

  • Dan Ebberts

    December 10, 2019 at 8:01 am

    Maybe like this then:

    w = wiggle(0.2,60);
    w %= 360;
    w += (w < 0) ? 360 : 0;


  • Scott Green

    December 10, 2019 at 8:06 am

    Sorry, that doesn’t work either.

    Motion Videos UK – We are creative video designers who bring pleasure, meaning and beauty to our small world through film, motion graphics and animation.

  • Dan Ebberts

    December 10, 2019 at 5:01 pm

    I think you just need to get rid of the “-” operator at the beginning of your text expression.


Viewing 1 - 6 of 6 posts

Log in to reply.

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