Stop Drag with a Wall in Grid

farhan94farhan94 Member, PRO Posts: 12

Hi I'm creating a maze game where you drag an actor on a grid to get to a certain point. I have it setup so when the actor is dragged, it is moved in the grid spaces only, however, the walls that I have in place make the actor go off the grid, go through the wall, and is dragged freely instead of being constrained to the grid spaces.

My goal was to have the walls stop the drag and have the actor stop at the grid space right before the wall. I was wondering if there is any solution or what I should do differently. Thanks in advance for any help.

Sign In or Register to comment.