How to create a sprite and set its angle sliding a finger

Get help using Construct 2

Post » Thu Feb 18, 2016 9:12 pm

Hey guys,

I would like to create a sprite on the tilemap and set its angle sliding my finger. I've attached the file with my try. Thanks in advance.

https://www.dropbox.com/s/szxragkebriaa ... .capx?dl=0
B
72
S
13
G
2
Posts: 989
Reputation: 6,969

Post » Fri Feb 19, 2016 2:45 am

Almost there! You've already captured the original X and Y. You need to compare that to where your finger ends up with the Angle() expression to get the angle.

On Touch End
Sprite - Set Angle to Angle(Sprite.InitialX, Sprite.InitialY, Touch.X, Touch.Y)
Mistakes were made.
B
47
S
23
G
107
Posts: 1,571
Reputation: 60,133

Post » Fri Feb 19, 2016 9:24 am

Sorry, maybe I didn't explain all my needs.

- I want to create the sprite and change the angle simultaneously or change the angle later.

- I need to get multiples of 90 degrees and only change the angle of the sprite that I'm touching.

If is possible, please, use the capx to make the changes.

Thanks in advance.
B
72
S
13
G
2
Posts: 989
Reputation: 6,969

Post » Fri Feb 19, 2016 6:25 pm

up
B
72
S
13
G
2
Posts: 989
Reputation: 6,969

Post » Fri Feb 19, 2016 6:46 pm

ImageImageImage
B
71
S
20
G
188
Posts: 3,530
Reputation: 107,334

Post » Fri Feb 19, 2016 8:53 pm

Thanks, @blackhornet

In this case, I just need to touch in the edges instead of to slide my finger, right?
B
72
S
13
G
2
Posts: 989
Reputation: 6,969

Post » Fri Feb 19, 2016 9:08 pm

Sorry, I don't understand the question.
ImageImageImage
B
71
S
20
G
188
Posts: 3,530
Reputation: 107,334


Return to How do I....?

Who is online

Users browsing this forum: Estudio Naranja, LaurenceBedford, LeirSchiessl, mekonbekon, whoisda and 3 guests