Slide in an angle to go in an angle

Bar Up GamesBar Up Games Member Posts: 35
edited April 2012 in Working with GS (Mac)
Hi everyone,
I am making a new game and got stuck in the middle of it. The game is very simple at the moment and I need something to get working. So I have a character and when you swipe the screen it shoots a ball. So I need it if you swipe at different speeds it goes faster, and when you swipe at an angle the ball goes in an angle. So basicly just shoots wherever you swiped and at the speed. Is this possible? Does anyone know how to do this?

Thanks,
BarUpGames

Best Answer

  • JohnPapiomitisJohnPapiomitis Posts: 6,256
    edited April 2012 Accepted Answer
    To sum it up have an attribute that you change to the vectorToAngle between the touch press and touch release, and have the balls move direction at that attribute. Tshirt might have a swipe video on gshelper.com im pretty sure.

    To change the speed depending on the speed of the swipe, Have an attribute that you change to attribute-1 every 0.1 seconds or something like that when the mouse is down, and then have the ball move at that attribute*20 or another number like that.

Answers

Sign In or Register to comment.