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
70
S
13
G
2
Posts: 989
Reputation: 6,914

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
98
Posts: 1,479
Reputation: 55,447

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
70
S
13
G
2
Posts: 989
Reputation: 6,914

Post » Fri Feb 19, 2016 6:25 pm

up
B
70
S
13
G
2
Posts: 989
Reputation: 6,914

Post » Fri Feb 19, 2016 6:46 pm

ImageImageImage
B
71
S
19
G
179
Posts: 3,475
Reputation: 102,666

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
70
S
13
G
2
Posts: 989
Reputation: 6,914

Post » Fri Feb 19, 2016 9:08 pm

Sorry, I don't understand the question.
ImageImageImage
B
71
S
19
G
179
Posts: 3,475
Reputation: 102,666


Return to How do I....?

Who is online

Users browsing this forum: DJKeefy, Lordshiva1948, NgTrent, oddreal and 12 guests