Applying Impulses
Lesson Objective
Apply directional impulses to safely land your spaceship.
Concepts Learned
- Direction and Motion
- Physics
- Event Handling
Code Blocks Introduced
{"func":"blockMotionPointTowards"}
Point Towards
{"func":"blockPhysicsApplyImpulse"}
Apply Impulse
{"func":"blockPhysicsApplyImpulseAngle"}
Apply Impulse At Angle
7 Programming Activities
-
1. Introduction
Now that you know about physics, it's time to learn how to boost!
-
2. Concepts
Learn how to point and apply impulses to an Actor.
-
3. Apply Impulse
Learn how to apply impulses to give an Actor a push in a certain direction.
-
4. Moon Lander
Time for a moon landing! Can you get the rocket to the platform safely?
-
5. Jumping Creatures
Use impulses to make the creatures jump and bounce around.
-
6. Break the Structure
Using all the concepts and blocks that you have learned, build a structure and knock it over.
-
7. Quiz
Test your knowledge.
Instructor Notes
- Explain impulse and how to apply impulse.
- Explain how to apply impulse at a certain angle.
- Recall how to follow the mouse pointer or an actor.
- Coding concepts covered are: sequencing, sensing, animation, event handling, and physics.
Review Questions
- What is impulse and why do you need it?
- How do you apply impulse to an actor to move the actor to the right diagonally?
- How does the shape of an actor affect how they behave?