Hard edge or object flow to screens

I am looking for the commands that will allow a program to ‘bounce’ an object off the edges of the screen
or "flow"an object that exits the screen to enter from the other side of the screen.

Here is some code I wrote for moving an image around the screen. This is a quick piece of code and could be made more efficient. But it shows you how to bounce off from the edge.

1 Like

Hi @gerald.carrell,

Can you link us to what you have so far? Is it something similar to what @bhatnagars posted, in which you move an object step-by-step, or are you working with an object that’s moving on its own? If @bhatnagars’s code works for your purpose, then awesome, but if you need more help, posting your code would give us an idea of what we’re working with.