How do I filter touch or mouse small moves?

Get help using Construct 2

Post » Wed Apr 30, 2014 9:35 pm

Hi guys!

I am testing a drag-and-drop system here using impulse if an object is being touched.

So, if it is being touched, I am making it to have an impulse towards the Touch X and Y. The thing here is that if the user is just touching it and still thinking about the next move, the object acts a little bit crazy going a few pixels randonly. I believe that it is acting this way because we cannot really keep our fingers that still.

Have you ever been into this situation? Any ideas? How to implement some kind of filter for touch or mouse small movements?

Thanks!
B
24
S
4
G
1
Posts: 177
Reputation: 1,827

Post » Thu May 01, 2014 12:16 am

I made you an example. I think this should solve the problem.

I used distance that check the "size" of the movement, and created a variable you can use to filter out events that need to.
You do not have the required permissions to view the files attached to this post.
B
43
S
12
G
6
Posts: 446
Reputation: 6,807

Post » Thu May 01, 2014 12:16 pm

Just perfect Sargas!
Thank you!
B
24
S
4
G
1
Posts: 177
Reputation: 1,827

Post » Thu May 01, 2014 12:17 pm

I have to know internal functions better!
B
24
S
4
G
1
Posts: 177
Reputation: 1,827

Post » Thu May 01, 2014 3:03 pm

no problem, i'm glad to help =)
B
43
S
12
G
6
Posts: 446
Reputation: 6,807


Return to How do I....?

Who is online

Users browsing this forum: Google [Bot] and 42 guests