Jose Ortega Posted September 13, 2015 Share Posted September 13, 2015 HelloI'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 More sharing options...
Skeptron Posted September 14, 2015 Share Posted September 14, 2015 Why don't you detect deltaX and deltaY of the swipe and increase velocity.x / velocity.y accordingly (if different from 0)? Are you doing a 2D side-view? Or an isometric game? Link to comment Share on other sites More sharing options...
Jose Ortega Posted September 15, 2015 Author Share Posted September 15, 2015 Thanks for answering but I don't get how could I use this properties to move in angle.The game has a top-down view with the player moving in the angle of swiping. Link to comment Share on other sites More sharing options...
Skeptron Posted September 16, 2015 Share Posted September 16, 2015 Well, if you move on the X AND Y axis at the same, time, it will look like you move in angle. Link to comment Share on other sites More sharing options...
Recommended Posts