Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Rolling circles into the screen

Explorer ,
Sep 02, 2022 Sep 02, 2022

Paste the code onto the position expression of a circle you made.

Use the rotation of the circle to roll the circle onto the screen.

 

// The radius is half the bounding box size

r = (thisLayer.sourceRectAtTime().width)/2;

// Scale compensation
s = thisLayer.transform.scale[0];
compensation = (s-100)*.01;

// compensated radius

cr = r + compensation * r;

// Number of pixels to roll, is circumference/360

circumference = 2*Math.PI*cr;

[value[0]+(circumference/360)*thisLayer.transform.rotation,value[1]]

 

 

TOPICS
Expressions , How to , Scripting
106
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
no replies

Have something to add?

Join the conversation