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

Corona infographic

New Here ,
Mar 29, 2020 Mar 29, 2020

Copy link to clipboard

Copied

Is it possible to achieve this infographic by Amy expression? With the balls colliding?

 

https://www.washingtonpost.com/graphics/2020/world/corona-simulator/

 

 

TOPICS
Expressions , Scripting

Views

140

Translate

Translate

Report

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
Mentor ,
Mar 29, 2020 Mar 29, 2020

Copy link to clipboard

Copied

LATEST

Sure.

Each ball knows it's own position and can read out the position of the other balls. So you can create an collision detection. It get's easier, if the balls are in a fixed order, so you only need to know the position of the next bal, or previous one - from whatever side you look at it. 

To move the ball, you can use the linear function which just takes the current position as starting point and some value larger then this as end point.

 

Check out Dan Ebberts site for the collision detection:

https://www.motionscript.com/design-guide/collision.html

 

A basic scetch could be:

 

if (previousBall.transform.position == (myPosition + perimeter)){

    linear (...);

} else {

    value;

};

 

*Martin

Votes

Translate

Translate

Report

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