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.

AppGameKit Classic Chat / [SOLVED] Dragging with speed an velocity

Author
Message
fubarpk
Retired Moderator
19
Years of Service
User Offline
Joined: 11th Jan 2005
Playing: AGK is my friend
Posted: 19th Dec 2015 07:38 Edited at: 12th Apr 2018 20:55
I just figured how to drag a sprite but what I want to do is then make it continue in the direction it was dragged in and depending on the speed the distance it will carry on



I might be doing this the total wrong way but ive just been exploring the input commands and didn't think a virtual joystick was what I wanted
but to quickly swipe an object and then get it to go x amount of distance depending on the swipe is the plan any help files I have missed that
you could perhaps point me in the right direction. Maybe an example file
fubar

The author of this post has marked a post as an answer.

Go to answer

AJCodes
9
Years of Service
User Offline
Joined: 6th Jan 2015
Location:
Posted: 19th Dec 2015 14:47
Look at the raw input commands...there's one, GetRawTouchType I think, that should help.

I had to convert start and end (distance) with time to create an ongoing velocity. Probably could have done it easier with tweening...but I didn't.
Born. Currently living.
Markus
Valued Member
20
Years of Service
User Offline
Joined: 10th Apr 2004
Location: Germany
Posted: 19th Dec 2015 18:35 Edited at: 19th Dec 2015 23:10
some example from me, but just tested with mouse.
AGK (Steam) V2.0.16 : Windows 10 Pro 64 Bit : AMD (15.30.1025) Radeon R7 265 : Mac mini OS X 10.10 (Yosemite)
fubarpk
Retired Moderator
19
Years of Service
User Offline
Joined: 11th Jan 2005
Playing: AGK is my friend
Posted: 20th Dec 2015 02:08
The raw touch commands are what I'm looking for, but under windows testing don't seem to do anything and the get raw mouse commands seem to be a bit lacking
fubar
CJB
Valued Member
20
Years of Service
User Offline
Joined: 10th Feb 2004
Location: Essex, UK
Posted: 21st Dec 2015 09:03
This post has been marked by the post author as the answer.
You might be able to use some physics commands to achieve what you are trying to do. Here's a little example:

V2 T1 (Mostly)
Phone Tap!
Uzmadesign
fubarpk
Retired Moderator
19
Years of Service
User Offline
Joined: 11th Jan 2005
Playing: AGK is my friend
Posted: 24th Dec 2015 00:19
thanks everyone
CJB that's exactly what I need
never really used the physics commands before
fubar

Login to post a reply

Server time is: 2024-11-25 13:38:23
Your offset time is: 2024-11-25 13:38:23