Table of Contents

if on edge, bounce

Description

The block checks to see if its sprite is touching the edge of the screen with the move steps block — and if it is, the sprite will point in a direction that mirrors the direction from which it is coming. It uses a line perpendicular to the edge to determine the reflection angle.

Example

The example demonstrates the wall bouncing of the sprite and rotation style.

Script

 

Output

Read More
All articles loaded
No more articles to load