Touch gestures for mobile in C3?

Post » Tue Mar 21, 2017 10:03 pm

Just curious if there will be any touch gestures build into C3, commonly used in mobile applications? Something like swipe left, swipe and hold, 3 finger swipe right, pinch, pull, etc. I know you can already do most of these in C2, but I'd like to see something easier implemented.
B
16
S
7
Posts: 190
Reputation: 1,823

Post » Tue Mar 21, 2017 10:20 pm

Seeing as how multi-touch for desktop is broken in chrome, there may be some issues for some gestures.
Image ImageImage
B
168
S
50
G
163
Posts: 8,220
Reputation: 105,059

Post » Tue Mar 21, 2017 11:23 pm

all those things you are listing are easy to do in Construct 2.


here is how you can do gestures (important to check the last page of that post)

plugin-unistroke-gesture-recognizer_t66773

using that plugin you can create your own stroke gestures but if you want simple stuff like "swipe right" you can do that by yourself with the events, just need a variable that reads the firts position of the touch.x/touch.y and the last position, compare those 4 values and done.

c2 also have a pinch to zoom example capx in it.
Image

Image
B
38
S
14
G
7
Posts: 408
Reputation: 8,338

Post » Thu Mar 23, 2017 5:49 pm

IJCT wrote:all those things you are listing are easy to do in Construct 2.
here is how you can do gestures (important to check the last page of that post)
plugin-unistroke-gesture-recognizer_t66773

using that plugin you can create your own stroke gestures but if you want simple stuff like "swipe right" you can do that by yourself with the events, just need a variable that reads the firts position of the touch.x/touch.y and the last position, compare those 4 values and done.

c2 also have a pinch to zoom example capx in it.


I know you can already do that. I mentioned as much because I knew someone would argue that point. I'd like it to be easier to add to a game though. Maybe just extend the already included "Touch" plugin. Touch Screens are very common these days, so why not?

I do appreciate you linking to the gesture plugin though, and explaining how to modify it. It looks easier than the way I've been doing it. Thanks!
B
16
S
7
Posts: 190
Reputation: 1,823

Post » Thu Mar 23, 2017 10:41 pm

i understand what you are saying about having already implemented events that can solve those things but i think is better if the users figure out their own way to do stuff like pinch and gestures, since not all pinch's mechanics works the same or gestures works the same, there are maaaany ways of doing a pinch and a gesture system and people shouldnt be led to just one by default instead of investigating and searching for their own, yeah it will be helpful for new users so thats more up to @Ashley to implement those things as premade events.



edit: btw there are soo much things that a prefabricated "pinch" will need in their properties and i find waay better to code your own pinch with the events rather than a prefab one.
Image

Image
B
38
S
14
G
7
Posts: 408
Reputation: 8,338

Post » Fri Mar 24, 2017 2:17 pm

IJCT wrote:i find waay better to code your own pinch with the events rather than a prefab one.

True. It's better to have tools to build your own, rather then being stuck with pre-made options.
B
127
S
33
G
17
Posts: 1,549
Reputation: 20,454

Post » Fri Mar 24, 2017 5:09 pm

glerikud wrote:
IJCT wrote:i find waay better to code your own pinch with the events rather than a prefab one.

True. It's better to have tools to build your own, rather then being stuck with pre-made options.


Well, you won't be stuck with it. You could still build your own.
B
16
S
7
Posts: 190
Reputation: 1,823

Post » Fri Mar 24, 2017 6:02 pm

Don't forget some gestures are os specific, like swipe up from the bottom on Android, or 4 touch close on Ios.
Image ImageImage
B
168
S
50
G
163
Posts: 8,220
Reputation: 105,059

Post » Fri Mar 24, 2017 6:42 pm

newt wrote:Don't forget some gestures are os specific, like swipe up from the bottom on Android, or 4 touch close on Ios.


Yeah, I agree. iOS has specific gestures swiping from the edges too. Swiping up from the bottom brings up the control panel, swiping down from the top shows notifications, and swiping from the right is for opening other apps in multitask/spit screen. I don't think devs have to worry too much about that because users are probably aware of those gestures already for their device and will know to avoid them.
B
16
S
7
Posts: 190
Reputation: 1,823

Post » Mon Mar 27, 2017 11:11 pm

I also want to make the point that most digital media consumption is done with mobile devices now and there is no indication that will change in the foreseeable future. :D
B
16
S
7
Posts: 190
Reputation: 1,823


Return to General Discussion

Who is online

Users browsing this forum: rhg1968 and 0 guests