<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[If On Edge, Bounce]]></title><description><![CDATA[<p dir="auto"> </p>
<h2><a class="anchor-offset" name="prerequisite"></a>Prerequisite</h2>
<ul>
<li><a href="/topic/73/working-with-blocks">Working with Blocks</a></li>
</ul>
<p dir="auto"> </p>
<h2><a class="anchor-offset" name="description"></a>Description</h2>
<p dir="auto">“If on edge, bounce” is a <strong>stack block</strong> in the <strong>motion</strong> category. This block is <strong>used to bounce back a sprite from the edges of the stage.</strong></p>
<p dir="auto"><img src="https://cdncreaticodecom.b-cdn.net/scratch-gui-projects/forum/e3369fe4-8e92-44ca-8875-b0d7083e153d.PNG" width="550" /><br />
 </p>
<h2><a class="anchor-offset" name="how-does-this-block-work"></a>How does this block work?</h2>
<p dir="auto">When a sprite <strong>is touching any edge of the stage</strong>, then the “If on edge, bounce” block will<strong>turn the sprite away from the edge.</strong> It will look like a ball bouncing off a wall.</p>
<p dir="auto">For example, if the direction of sprite <strong>before bouncing</strong> is <strong>90</strong>, then the direction of sprite <strong>after bouncing</strong> will be <strong>-90</strong>.</p>
<p dir="auto"><img src="https://cdncreaticodecom.b-cdn.net/scratch-gui-projects/forum/baef8fc6-1cde-4420-9bd5-4f1c1da249b7.gif" width="800" style="border-radius:5px;border:1px solid #29622d" /><br />
 </p>
<h2><a class="anchor-offset" name="do-not-rotate"></a>Do Not Rotate</h2>
<p dir="auto">If you <strong>do not want the sprite to turn upside-down</strong> after bouncing from the edge, then you can <strong>set the rotation style of the sprite to “Do not rotate”.</strong></p>
<p dir="auto">Click on the direction input box in the sprite pane, <img src="https://cdncreaticodecom.b-cdn.net/scratch-gui-projects/forum/02ef78c3-fc40-42cb-bd75-127acda92c5a.PNG" width="300" />, and select the “Do not rotate” mode:</p>
<p dir="auto"><img src="https://cdncreaticodecom.b-cdn.net/scratch-gui-projects/forum/6f08672c-b8bc-456c-8455-3007c886bbef.PNG" alt="direction4.PNG" class=" img-responsive img-markdown" width="198" height="289" /></p>
<p dir="auto"> <br />
<img src="https://cdncreaticodecom.b-cdn.net/scratch-gui-projects/forum/db04559f-1b53-4edc-b10a-44b4aac20869.gif" width="800" style="border-radius:5px;border:1px solid #29622d" /><br />
 </p>
]]></description><link>https://forum.creaticode.com/topic/189/if-on-edge-bounce</link><generator>RSS for Node</generator><lastBuildDate>Tue, 17 Mar 2026 14:45:04 GMT</lastBuildDate><atom:link href="https://forum.creaticode.com/topic/189.rss" rel="self" type="application/rss+xml"/><pubDate>Fri, 10 Jun 2022 23:43:38 GMT</pubDate><ttl>60</ttl></channel></rss>