Smart touch control for side scroler?

0 favourites
  • 2 posts
From the Asset Store
Build your own spaceship for your side scroller space shooter games with various components.
  • So I am experimenting little bit with touch controls.

    background: game is gravity side scroller (you are running around circular planets) trying to get to other planets.

    I was thinking how to make control such that player will move (or go by itself) until it gets to closest point you touched on screen.

    My idea was to use half circle objects that will rotate on the screen with player. But that only kind of works only until player is in the centre of the screen.


    Next I was thinking if it was possible to calculate function y = k*x + b(where player would be 0,0 of the grid and his up angle would the parameter k) so that you can test if b = y - a*x is zero(x,y are coordinates of the touch). It it is more then zero player would be pressing left until it is zero, and if it is less then zero, player would be pressing right until it is zero. But I could not get this working correctly (even for the half of the screen).

    <img src="" border="0" />

    Do you have any suggestion, ideas?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • 137 views and no response BUT IT CAN BE DONE! :P


    Make platform to follow your touch correctly on circular ground. :)

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