How do I only change angle using a thumbstick?

Get help using Construct 2

Post » Sun Feb 22, 2015 7:40 am

I have seen examples about how to make a touch control stick on the forums, but all of them have the object that the control stick is connected to not only change angle but move as well. The objects have eight directional behavior but what I simply want to create is having the control stick move and the object only changing it's angle according to the control stick's position

My recent attempts of making an object change angle were to follow touch and change angle via touch arrows but they didn't fit my game design very well. The touch control stick seems to be the most versatile. How do I go about doing this?
Risk Rocket now available on Google Play
Image
B
35
S
15
G
6
Posts: 337
Reputation: 6,275

Post » Sun Feb 22, 2015 9:20 am

I am afraid you will have to do it manually, with keyboard object, like:

when "up arrow" down - rotate toward angle 270
else
when "down arrow" down - rotate toward angle 90

etc
B
12
S
6
G
2
Posts: 99
Reputation: 1,727

Post » Sun Feb 22, 2015 9:38 am

It's possible.


Can you post the CApx of the thumbstick your using so I(or someone else if they beat me) can just edit that to what you need
B
42
S
17
G
2
Posts: 850
Reputation: 6,209

Post » Sun Feb 22, 2015 7:43 pm

Here's the capx. I tried but obviously failed as you'll see. I was trying emulate Jayderyu's design of thumbstick, I like it but the moving thumbstick can move anywhere. How do I make it so that the main stick has limited movement and is ultimately an actual thumbstick?
You do not have the required permissions to view the files attached to this post.
Risk Rocket now available on Google Play
Image
B
35
S
15
G
6
Posts: 337
Reputation: 6,275

Post » Sun Feb 22, 2015 8:23 pm

To be clear, are you wanting the object to point in the same direction as the stick? Or do you want it to rotate counter-clockwise when the stick is held left, clockwise when held right, something along those lines?

EDIT: If it's the former, here's an example where the object faces the direction of the stick and the position of the stick is limited. I made no assumptions about which side of the sprite is which, so you may need to adjust its angle by plus or minus 90 degrees.
You do not have the required permissions to view the files attached to this post.
Moderator
B
113
S
41
G
20
Posts: 1,586
Reputation: 19,106

Post » Sun Feb 22, 2015 8:36 pm

Wow! That's really well done. Thank you so much, this is exactly what I meant.
Risk Rocket now available on Google Play
Image
B
35
S
15
G
6
Posts: 337
Reputation: 6,275


Return to How do I....?

Who is online

Users browsing this forum: istero, joliemoc, SantasProject, XMatrix and 11 guests