Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Newcomers AppGameKit Corner / question about sprite drag using touch on mobile devise.

Author
Message
Dark Raven
4
Years of Service
User Offline
Joined: 27th Jul 2014
Location: United States
Posted: 19th Mar 2019 06:19
I'm not sure if this is possible or if there is a work around but what I'm trying to do is allow movement of the player's sprite be controlled by touch drag. I've got it where I can drag sprite to control movement just fine. The problem lies if a second finger presses on the screen then the sprite jumps to that finger position. I've tried multiple commands from the help but nothing seems to keep it from jumping to the second touch location. I've seen games that I've download have this so I was just wondering if there is a way to do this in Appgamekit tier 1. Basically trying to prevent the sprite from jumping and keep it draging with the initial touch.

Thanks in advance

Michael
blink0k
AGK Developer
Gold Codemaster
6
Years of Service
User Offline
Joined: 22nd Feb 2013
Location: the land of oz
Posted: 19th Mar 2019 11:08
Have a look at GetRawNextTouchEvent( ) . There is some example code in the Help page as well

Login to post a reply

Server time is: 2019-05-22 05:56:09
Your offset time is: 2019-05-22 05:56:09