How do I follow touch

0 favourites
  • 4 posts
From the Asset Store
All popular touch mechanics - scrolling, zooming, swiping
  • I know how to make my object follow my mouse, but how do I make it follow the touch??

    I am making one of those games, bouncing fireballs and floating bar that follows the mouse/touch.

    The game is fine follow the mouse, but I could not get it follow the touch. How exactly to do that? set X = Touch.X??

    On touching end, set X = Touch.x??

    and for some reason, the touch method i used, the bar is way off where touch's at, why is that?

    eg.

    if my bar is right here ___________ my finger will be here.

    any useful tips are welcome.

  • Check the image points of the bar. Make sure the origin image point is in the right place, often if you resize images it will have moved.

    For following touch the 'For every tick : set X = Touch.X & set Y = Touch.Y' should work fine, you should not need to have anything trigger on touch end unless you want something else to happen when you release the touch.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Check out the 'Vertical space shooter' template in the example projects. When you create a new project, you can find them below the various empty project setups.

    It might not be exactly what you're looking for as is, but if you take out the Y axis it could be just that.

  • Thanks, I will try later, and let you guys know how it goes.

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