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)
B
58
S
19
G
3
Posts: 445
Reputation: 6,300

Post » Sat Sep 28, 2013 11:07 pm

Set the objects angle to the same angle you're moving it at.
B
47
S
14
G
7
Posts: 603
Reputation: 8,141

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
B
58
S
19
G
3
Posts: 445
Reputation: 6,300

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
47
S
14
G
7
Posts: 603
Reputation: 8,141

Post » Sun Sep 29, 2013 6:58 am

worked! thank you
B
58
S
19
G
3
Posts: 445
Reputation: 6,300


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 4 guests