If On Edge, Bounce
-
Prerequisite
Description
“If on edge, bounce” is a stack block in the motion category. This block is used to bounce back a sprite from the edges of the stage.
How does this block work?
When a sprite is touching any edge of the stage, then the “If on edge, bounce” block willturn the sprite away from the edge. It will look like a ball bouncing off a wall.
For example, if the direction of sprite before bouncing is 90, then the direction of sprite after bouncing will be -90.

Do Not Rotate
If you do not want the sprite to turn upside-down after bouncing from the edge, then you can set the rotation style of the sprite to “Do not rotate”.
Click on the direction input box in the sprite pane,
, and select the “Do not rotate” mode:

Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login