HOW: Make player face direction moving?

Get help using Construct 2

Post » Sat Sep 28, 2013 10:34 pm

I have a touch joystick. When I move my player around with:
angle(control2.X,control2.Y,thumb1.x,thumb1.y)
The player doesn't run towards the direction he is moving as he's always facing left. How do I make it so that he can always turn towards direction movement?

Objects:
Control2 (what the thumbstick sits inside of)
thumb1 (is the thumb stick)

Events:
DragDrop is dragging: Move 5 pixels at angle angle(control2.X,control2.Y,thumb1.X,thumb1.y)

DragDrop is not dragging: Set positoin to (control2.X,control2.Y)
Football Dash (1m+): GooglePlay | AppStore

Zombie Bash: GooglePlay | AppStore

www.lumicreative.com
B
80
S
30
G
8
Posts: 500
Reputation: 10,572

Post » Sat Sep 28, 2013 11:07 pm

Set the objects angle to the same angle you're moving it at.
B
48
S
15
G
7
Posts: 603
Reputation: 8,266

Post » Sat Sep 28, 2013 11:12 pm

[QUOTE=EncryptedCow] Set the objects angle to the same angle you're moving it at.
[/QUOTE]
How can this be done? Sorry I am a noob
Football Dash (1m+): GooglePlay | AppStore

Zombie Bash: GooglePlay | AppStore

www.lumicreative.com
B
80
S
30
G
8
Posts: 500
Reputation: 10,572

Post » Sun Sep 29, 2013 3:36 am

The same way you make it move at an angle. Right after you move it, set the objects angle to angle(control2.X,control2.Y,thumb1.X,thumb1.y)
B
48
S
15
G
7
Posts: 603
Reputation: 8,266

Post » Sun Sep 29, 2013 6:58 am

worked! thank you
Football Dash (1m+): GooglePlay | AppStore

Zombie Bash: GooglePlay | AppStore

www.lumicreative.com
B
80
S
30
G
8
Posts: 500
Reputation: 10,572


Return to How do I....?

Who is online

Users browsing this forum: Google [Bot] and 5 guests