Private Consultancy Portal
Successfully animate a group of shapes (like a stick figure or a "DVD" icon) so they move across the canvas while rotating or bouncing off edges.
Using centerX , centerY , and rotateAngle within a repeating loop. 6.3.5 Cmu Cs Academy
Example: if (icon.right >= 400 or icon.left <= 0): icon.dx *= -1 . Successfully animate a group of shapes (like a
This function runs automatically multiple times per second. You must update the centerX and rotateAngle of your person here. person.centerX += 5 (moves the person right) person.rotateAngle += 10 (rotates the person) You must update the centerX and rotateAngle of
If you are moving a complex character, ensure all parts are in a single Group . If you only move one part, the stick figure will "fall apart" as it moves. Why This Lesson Matters
To make an object bounce, you must check its edges against the canvas width/height.
You must write conditional statements ( if/elif/else ) to check if an object has hit a boundary or completed a cycle, then reverse its direction or reset its position. Step-by-Step Breakdown for "Continuous Cartwheels"