cotrol look direction with circle? (see topic)

Get help using Construct 2

Post » Thu Jul 18, 2013 9:30 pm

You know how some touch screen games will give you that little zone in one corner of the a screen that controls which direction your character points? How would I replicate this in C2? So if you drag your finger to the top rightish part of the zone, your character faces to the top rightish part of the screen?

I really have no idea what it's called, but if anyone call help, thanks in advance.
B
6
S
1
Posts: 90
Reputation: 840

Post » Thu Jul 18, 2013 10:59 pm

It's called a thumbstick
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Post » Sat Jul 20, 2013 3:23 am

Sweet, thanks! Do you know how to make it so the thumb-stick only changed the direction that the thing is looking? My guy is pinned in the middle of the floor, so he's not going anywhere. I want to change only his line of sight.
B
6
S
1
Posts: 90
Reputation: 840

Post » Sat Jul 20, 2013 7:53 am

That would probably be as easy as

set player angle - angle(thumbstick.x,thumbstick.y,touch.x,touch.y)

where thumbstick is the circle-sprite your touch should be over.
Ofcourse you should only set this angle if distance (thumbstick.x,thumbstick.y,touch.x,touch.y) is less than the radius of the thumbstick sprite.
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775


Return to How do I....?

Who is online

Users browsing this forum: Nicolas951 and 17 guests