Joystick for moving a sprite

Get help using Construct 2

Post » Mon Jan 16, 2017 7:45 pm

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

Post » 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
20
S
7
G
3
Posts: 302
Reputation: 3,634

Post » 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,107

Post » 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
20
S
7
G
3
Posts: 302
Reputation: 3,634

Post » 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
20
S
7
G
3
Posts: 302
Reputation: 3,634

Post » 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
20
S
7
G
3
Posts: 302
Reputation: 3,634

Previous

Return to How do I....?

Who is online

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