How do I drag and drop pixel rounding

Get help using Construct 2

Post » Thu Apr 16, 2015 8:58 am

No, the operating system only updates the mouse at a certain frequency, and it's not possible to get it any faster. To solve this you have to step the position between the current mouse position and the last mouse position, simulating as if the mouse had really moved in small steps between those two points.
Scirra Founder
B
381
S
222
G
84
Posts: 23,980
Reputation: 189,180

Post » Thu Apr 16, 2015 1:15 pm

@Ashley I see. I thought about this solution you mentioned but I couldn't put it together.
Is there any example I could use? I looked it up online but I couldn't find anything useful.

Thanks
B
108
S
43
G
24
Posts: 399
Reputation: 21,487

Post » Thu Apr 16, 2015 1:53 pm

This seems to work:

updated capx

Just added an is nearest to open spot - condition.
Might still be it's possible to move too fast, but it's working a lot better than the last one, for it reacted to multiple overlap.
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Post » Thu Apr 16, 2015 2:07 pm

@LittleStain That looks great. Thank you very much!
B
108
S
43
G
24
Posts: 399
Reputation: 21,487

Post » Thu Apr 16, 2015 2:27 pm

To prevent the player to move the blocks past the borders, I added this to the code
Image
B
108
S
43
G
24
Posts: 399
Reputation: 21,487

Previous

Return to How do I....?

Who is online

Users browsing this forum: No registered users and 9 guests