Smart touch control for side scroler?

Get help using Construct 2

Post » Sat Jun 22, 2013 7:45 pm

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.

example: https://dl.dropboxusercontent.com/u/71343504/construct2/TouchScreenControlTEST01.capx

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).


Do you have any suggestion, ideas?
B
12
S
2
Posts: 37
Reputation: 707

Post » Mon Jun 24, 2013 8:54 am

137 views and no response BUT IT CAN BE DONE! :P

example: http://t.enyoneugenius.net/

Make platform to follow your touch correctly on circular ground. :) enyon2013-06-24 08:56:18
B
12
S
2
Posts: 37
Reputation: 707


Return to How do I....?

Who is online

Users browsing this forum: brunopalermo, MaxxMunnn, richcoz81 and 33 guests