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
73
S
13
G
2
Posts: 990
Reputation: 6,996

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,572
Reputation: 60,135

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
73
S
13
G
2
Posts: 990
Reputation: 6,996

Post » Fri Feb 19, 2016 6:25 pm

up
B
73
S
13
G
2
Posts: 990
Reputation: 6,996

Post » Fri Feb 19, 2016 6:46 pm

ImageImageImage
B
71
S
21
G
211
Posts: 3,613
Reputation: 119,145

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
73
S
13
G
2
Posts: 990
Reputation: 6,996

Post » Fri Feb 19, 2016 9:08 pm

Sorry, I don't understand the question.
ImageImageImage
B
71
S
21
G
211
Posts: 3,613
Reputation: 119,145


Return to How do I....?

Who is online

Users browsing this forum: tarek2 and 1 guest