Prevent sprite from crossing a wall

81 views
Skip to first unread message

Markus Lindinger

unread,
Jan 24, 2019, 8:43:47 PM1/24/19
to MIT App Inventor Forum
I'm trying to make a sprite randomly move through a maze that is drawn on a canvas. The heading is initialized at a random movement when the screen loads. 

I implemented a clock that is supposed to check if the background of the nearest pixel in the heading of the sprite is white or not. If it is not white, it is supposed to calculate a new heading.

What is the best and most reliable way to make this work?

Any help is much appreciated

Boban Vukovic

unread,
Jan 25, 2019, 2:20:40 AM1/25/19
to MIT App Inventor Forum
Check this,and you may get some ideas
bug (2).aia
Reply all
Reply to author
Forward
0 new messages