Swipe to Move & Snap to Grid

CaptMediaCaptMedia Member Posts: 60
edited April 2012 in Working with GS (Mac)
Hi, as the title says I am trying to get swipe to move and snap to grid working together. So far I have followed @Tshirtbooth youtube tutorials on both and it has worked well. The only problem that I am having is when I do not swipe directly up-down-left-right it will move diagonally. Is there anyway to prevent diagonal movement, and limit it only to side-to-side or up-and-down. Thanks

Answers

  • CaptMediaCaptMedia Member Posts: 60
    Thanks for the quick response @tshirtbooth, how would I do this if I wanted to keep the functionality for all the up-down-left-right movements. Thanks
  • wallywally11wallywally11 PRO Posts: 5
    On swipe I would check the distance "swiped" in both the x and y axis. then just use the one that is longer to control which direction they go. A good example would be a 2 inch swipe up and to the right at 15 degrees. Calculate x distance swiped, then y distance swiped and make the actor move up since it would be more of an up-down delta than a left-right delta.
    Hope that's easy to follow, not the best at describing what I'm picturing in my head.. haha.
Sign In or Register to comment.