playMaker

Author Topic: Swipe to move [SOLVED]  (Read 1174 times)

HaraldsVeiss

  • Junior Playmaker
  • **
  • Posts: 66
    • View Profile
Swipe to move [SOLVED]
« on: January 25, 2014, 02:49:57 PM »
Hello!

I am making a game, that requires swipe to move. What I mean is, when I swipe left I want my character to move left till the end of the screen.

I can't quite figure it out. Its probably  very easy, but since I'm new to this, I haven't noticed the right action.

Best,
Haralds
« Last Edit: January 27, 2014, 11:07:32 AM by HaraldsVeiss »

escpodgames

  • Hero Member
  • *****
  • Posts: 673
    • View Profile
    • Assets
Re: Swipe to move
« Reply #1 on: January 25, 2014, 02:58:59 PM »
Check out the Swipe Gesture Event.

When a swipe is detected based on a minimum distance it will send one of 4 events, Swipe Left, Swipe Right, Swipe Up or Swipe Down.
« Last Edit: January 25, 2014, 03:01:14 PM by LampRabbit »

HaraldsVeiss

  • Junior Playmaker
  • **
  • Posts: 66
    • View Profile
Re: Swipe to move
« Reply #2 on: January 25, 2014, 03:07:02 PM »
Oh yeah, thats what I needed! Thank you!

What action would you suggest for movement in iOS after the swipe is detected?

H.

HaraldsVeiss

  • Junior Playmaker
  • **
  • Posts: 66
    • View Profile
Re: Swipe to move
« Reply #3 on: January 26, 2014, 08:30:45 AM »
I will explain what I have set up at this time.

I have swipe gesture event, it is working as it should. The problem is with the movement, I can't figure out, how to make my character to move with constant speed up when player swipes up, when swipes left character changes direction and moves left, in constant speed.

Can someone help?

Best,
Haralds

HaraldsVeiss

  • Junior Playmaker
  • **
  • Posts: 66
    • View Profile
Re: Swipe to move
« Reply #4 on: January 27, 2014, 11:06:10 AM »
Hi!

I already solved it, if someone has similar problem tell me. I will explain how I did it.

Best,
Haralds