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
14
G
4
Posts: 1,016
Reputation: 8,135

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
54
S
28
G
115
Posts: 1,705
Reputation: 65,083

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
14
G
4
Posts: 1,016
Reputation: 8,135

Post » Fri Feb 19, 2016 6:25 pm

up
B
74
S
14
G
4
Posts: 1,016
Reputation: 8,135

Post » Fri Feb 19, 2016 6:46 pm

ImageImageImage
B
71
S
22
G
257
Posts: 3,791
Reputation: 142,698

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
14
G
4
Posts: 1,016
Reputation: 8,135

Post » Fri Feb 19, 2016 9:08 pm

Sorry, I don't understand the question.
ImageImageImage
B
71
S
22
G
257
Posts: 3,791
Reputation: 142,698


Return to How do I....?

Who is online

Users browsing this forum: OddConfection and 4 guests