If On Edge, Bounce
CreatiCode last edited by
“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.
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.
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: