You should check boundary collisions to pervert bob from going of screen Heres how i do it
if bob.xcor() > 500 or bob.xcor() < -500 or bob.ycor() > 400 or bob.ycor() < -400:
Bob.home()
You can replace the numbers depending on how big your boundaries are bob.xcor() has the value of where bob is horizontally (the center being the origin) bob.ycor() has the value of bobs position vertically bob.home() send bob back to the center of the screen
You should check boundary collisions to pervert bob from going of screen
Heres how i do it
You can replace the numbers depending on how big your boundaries are
bob.xcor()
has the value of where bob is horizontally (the center being the origin)bob.ycor()
has the value of bobs position verticallybob.home()
send bob back to the center of the screen