Detect screen mouse position

Discussion and feedback on Construct 2

Post » Tue Jan 05, 2016 12:59 pm

I want to move the windows when mouse button is down anywhere in the canvas. I got x & y cordinates with Touch.AbsoluteX+NWjs.WindowX but, when the window is too large, flickering appears. Is there another way to get x & y screen coordinates?
B
9
S
1
Posts: 33
Reputation: 600

Post » Wed Jan 06, 2016 8:14 am

Not sure it will work but what about setting touch x.y to a var when start touching, then while touching calculate the position by distance from the start point to the current touch (inside the canvas)?
Image
B
71
S
28
G
12
Posts: 515
Reputation: 12,284

Post » Wed Jan 06, 2016 11:32 am

No. The problem seems to be that there is a retard when the algorithm is trying to detect the window position. The result is an erroneous movement when the window is dragged. I think that getting the X and Y coordinates with javascript or something, could give better ressults.
B
9
S
1
Posts: 33
Reputation: 600


Return to Construct 2 General

Who is online

Users browsing this forum: No registered users and 4 guests