# Joystick for moving a sprite

Get help using Construct 2

### » Mon Jan 16, 2017 7:45 pm

Have you looked at 8 direction behaviour?
B
38
S
18
G
19
Posts: 664
Reputation: 14,112

### » Mon Jan 16, 2017 9:00 pm

I looked into the 8 direction behavior, but the angles were weird when I used arrow keys, like click arrow key, move in this direction. Depending on what direction i had in the code the sprite would move at different angles.

These are not the actual numbers, just as an example:

Like Touch Left at -90 at 100 speed, then touch right at 180 degrees at 100 speed. the sprite would move left with Touch Left and Up with 180 degrees.

If I then put Touch Right above Touch left in the code, the sprite would move at different angles.

How would I integrate the 8 directions into your code for a Joystick?
B
24
S
9
G
3
Posts: 315
Reputation: 3,960

### » Mon Jan 16, 2017 9:53 pm

In that case i think you could just use my example. But i'd have to look at it to get the rotate out of there.

I'll look at it today.
B
38
S
18
G
19
Posts: 664
Reputation: 14,112

### » Mon Jan 16, 2017 10:18 pm

The only game I've ever done involved tapping sprites, it didn't involve the player actually moving a sprite, that's why I have so many questions.
B
24
S
9
G
3
Posts: 315
Reputation: 3,960

### » Fri Jan 20, 2017 10:32 pm

When you can please let me know about integrating 8-directional movement, without the Sprite's angle of orientation changing, into a joystick. The only game I've done involved tapping sprites so I have no idea how to do it with a joystick and 8-directions, sorry.

Unless Joystick cant use 8-directions, and arrow keys are the only way to go for 8-directions?
B
24
S
9
G
3
Posts: 315
Reputation: 3,960

### » Sat Jan 21, 2017 6:32 pm

Basically, moving with 8 directional movement with a joystick, but the sprite stays upright (angle of orientation doesn't change.)
B
24
S
9
G
3
Posts: 315
Reputation: 3,960

### » Fri Mar 23, 2018 4:13 pm

How do you make the character move in 8 directions with the joystick. That's the part i need help with. Please explain!
B
4
Posts: 3
Reputation: 206

Previous