Jump to content

Moving in angle of swipe


Jose Ortega
 Share

Recommended Posts

Hello

I'm trying to move my character by swiping. It should move in the direction of swiping.

 

I'm using arcade physics

 

Right now is moving in an orthogonal fashion. If I swipe left, it moves left, if I swipe up, it moves up. The goal is to move the character in the angle of swipe and then gradually slow down.

 

I was thinking about finding the angle between start and end position of swipe and the move forward.

How could I implement this forward movement? Should be better to switch to P2 physics? The game is a prototype and I would like to keep it as simple as posible that's why I'm using Arcade physics.

 

Any ideas and help are appreciated.

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...