Press up against maze wall

The standard code to stop the player at a wall looks like this, for each direction:

picture1

The problem is, this is as close as you can get to a wall:

Screenshot

Would it be possible to improve this script such that you can actually press up against a wall?

one problem with your code is that you're changing the y by -2 if it's touching the wall. A better solution would be to do this.
untitled script pic (84)

(p.s. you might be able to just drag and drop the image into snap and get the script)

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.