Table of Contents

change velocity by vx () vy ()

Description

The block changes the velocity of the sprite by the defined values in the x and y directions.

Example

In this example, we simulate the covid experiment using the physics simulation.

In this example, we simulate the covid experiment using the physics simulation. Following is what we are doing:

  1. 21 humans are created with 20 green and 1 red ball.
  2. Gravity is set to 0 simulating zero gravity.
  3. The balls move at random speeds constantly creating random behavior.
  4. If the green balls touch the red balls, it turns red.
  5. After 10 seconds the red ball gets converted to green.

Script

Output

Read More
All articles loaded
No more articles to load