How do I make one omnidirectional mobile button

Get help using Construct 2

Post » Wed May 25, 2016 3:16 pm

Hello,
Right now I use 4 buttons in a mobile game:
Image
I want just one button and make it omnidirectional to rotate the player and move him. (top-down shooter)

I want the player to hold touch on a button and rotate the player towards the position of the touch.x-button.x (also .y).
Image
Imagine if the big one is the button and the black circle is where the player taps.
How can I find the degrees so that the player rotates to that position?

Also, the problem is that button.X is not the X value on the locked screen, but rather the position of the X on the map. Same for Y.
This makes it impossible to do.
B
25
S
7
G
1
Posts: 200
Reputation: 2,530

Post » Wed May 25, 2016 4:24 pm

B
65
S
39
G
24
Posts: 352
Reputation: 18,106

Post » Wed May 25, 2016 4:57 pm

This should do what you wanted it to do.

example.capx
B
11
S
3
G
1
Posts: 98
Reputation: 1,062

Post » Thu May 26, 2016 8:35 am

Thanks for your replies. I solved it.
B
25
S
7
G
1
Posts: 200
Reputation: 2,530


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 23 guests