breakout support for touch

Get help using Construct 2

Post » Tue Dec 11, 2012 5:41 am

I looked at the capx for the tutorial below and understand it, but i am trying to turn mouse into a touch instead. so i did the following. set x to touch.x in replace of mouse.x but the moment my mouse simulating touch releases it springs back to the edge. i attempted to say every tick set paddle to currentX global variable that is suppose to be set after person is not touching but it doesn't work. still springs back

Cloning the classics breakout videoAphixe2012-12-11 05:41:36
B
17
S
4
Posts: 20
Reputation: 1,245

Post » Fri Dec 14, 2012 3:06 am

Should I remove mouse and add draggable behavior if detecting touching object and mouse otherwise
B
17
S
4
Posts: 20
Reputation: 1,245

Post » Fri Dec 14, 2012 4:32 am

If your going to use touch I found it much better to not bother with Mouse. Also I found that when using touch it's best to use Touch to get the original contact position then use a Drag and Drop box.

ie
Touch on touchobject
dragbox set position touch.x and touch.y

dragbox is dragging
-> paddle.x = dragbox.x

that way when you release touch your paddle should stay still as your not constantly setting position by the touch, but instead the dragging box.
B
87
S
18
G
9
Posts: 2,455
Reputation: 14,834


Return to How do I....?

Who is online

Users browsing this forum: Artpunk, gregorysforster, onzephyr and 2 guests