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 / detect finger trace on tablet

Author
Message
DannyD
6
Years of Service
User Offline
Joined: 29th Aug 2017
Location:
Posted: 13th Nov 2018 01:44
Hi Guys
Searching the forum and couldn't really find anything examplaining my problem
I want to be able to detect a specific "route" touch on the tablet.
EG. I'm busy developing a alphabet APP for the kids,
I want to show a image/sprite, eg: "A". now I want to detect the touch movement over the letter a, and if they go outside the borders?
will this somehow be possible?
Thanks
Danie
blink0k
Moderator
11
Years of Service
User Offline
Joined: 22nd Feb 2013
Location: the land of oz
Posted: 13th Nov 2018 02:40
The GetPointer functions should be able to do the job. Search for GetPointer here
DannyD
6
Years of Service
User Offline
Joined: 29th Aug 2017
Location:
Posted: 13th Nov 2018 02:52
Hi
Thanks for the reply
Yes, I'm using getpointer, and getpointer pressed
I have 2 problems
1. How to make the "drawline" wider
2. How to detect if I hit the "border" of the letter
Thanks
blink0k
Moderator
11
Years of Service
User Offline
Joined: 22nd Feb 2013
Location: the land of oz
Posted: 13th Nov 2018 03:18 Edited at: 13th Nov 2018 03:20
You could use GetSpriteX/YFromWorld(). Then check if the values are outside the bounds of your sprite
You cannot change the thickness of DrawLine. You could probably use a combination of circles (at the points) and Boxes for the lines
DannyD
6
Years of Service
User Offline
Joined: 29th Aug 2017
Location:
Posted: 13th Nov 2018 03:28
HI
Thanks Blink0K

Got this kinda working with a Sprite.
Maybe not the correct way!
Will check now for detecting Spritecollisions using the GetSpriteX/YFromWorld()


Attachments

Login to view attachments
DannyD
6
Years of Service
User Offline
Joined: 29th Aug 2017
Location:
Posted: 13th Nov 2018 07:22
Hi Guys
This will do for me, for now
Hope someone else find it usefull...

Attachments

Login to view attachments

Login to post a reply

Server time is: 2024-04-25 12:34:14
Your offset time is: 2024-04-25 12:34:14