breakout support for touch

0 favourites
  • 3 posts
From the Asset Store
Breakout Bliss design For programming and publishing to other platforms
  • 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 video

  • Should I remove mouse and add draggable behavior if detecting touching object and mouse otherwise

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • 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.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)