πŸ”Ί Mission 3: Making a Vertical Triangle! | myBetabox

πŸ”Ί Mission 3: Making a Vertical Triangle!

Starting Mission 3!

Now that you have mastered simple motions like forward and backward, you can branch out into more complex motions! Specifically, traveling in two dimensions at the same time!

This is a little more complex than traveling in one dimension but shouldn't be too much harder to understand. To travel in two dimensions, we will need to utilize the fly to block, which you can see below and is a little more complex:

This block tells your drone to move in the X (forward/backward), Y (left/right), and Z (up/down) directions from where it is now.

For example, the above code would tell the drone to move 20 inches forward, 20 inches to the right, and 20 inches up at the same time! You can see how this could lead to some interesting flight paths and make it possible to fly diagonally.

If you use negative numbers here, your drone will move backwards, to the left, or down, depending on which dimension you're using it in.

In this mission, you need to make a vertical triangle!
Again, let's take a look at some pseudocode to figure out how your drone needs to fly:

  1. Takeoff
  2. Fly up and forward simultaneously
  3. Fly down and forward simultaneously
  4. Fly backward to return to starting position
  5. Land

Make sure to really think about how far the drone needs to move in each direction so that your drone returns to the beginning of the triangle.

The easiest triangle to make using this method will be an isosceles triangle with two sides being the same length.


Having Trouble? Look Below!