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
74
S
13
G
4
Posts: 1,005
Reputation: 8,053

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
52
S
26
G
109
Posts: 1,611
Reputation: 61,643

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
74
S
13
G
4
Posts: 1,005
Reputation: 8,053

Post » Fri Feb 19, 2016 6:25 pm

up
B
74
S
13
G
4
Posts: 1,005
Reputation: 8,053

Post » Fri Feb 19, 2016 6:46 pm

ImageImageImage
B
71
S
22
G
241
Posts: 3,734
Reputation: 134,494

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
74
S
13
G
4
Posts: 1,005
Reputation: 8,053

Post » Fri Feb 19, 2016 9:08 pm

Sorry, I don't understand the question.
ImageImageImage
B
71
S
22
G
241
Posts: 3,734
Reputation: 134,494


Return to How do I....?

Who is online

Users browsing this forum: hrisnz and 13 guests