# How do I do Circle Math..lol

Get help using Construct 2

### » Tue Jan 20, 2015 3:32 pm

Ok I have been trying to figure this out myself but been stumbling over it too long and wanted some real math people to help me here.

I have the X,Y of my initial Touch, with my touch I pull back in any direction (think like Angry birds) which I then have the angle of my initial touch and my current touching point.

What I need is to be able to get the X,Y of a point the opposite angle I am pulling but only a certain amount of pixels. So essentially, where I am pulling back there should be a dot on the opposite side of the circle but only 30 px from the center point (not the distance of my current touch to the center, just a set amount). So I can just drag around and there should be a dot making a perfect circle at the same distance away from the center point.

Does that make sense?

I had been trying to set the dot using a formula I saw on here but it's not working on most angles.
X = X + 30 * cos(angle)
Y= Y + 30 * cos(angle)

Any help would be fantastic!

Learn to make a clicker game for cheap!
https://www.scirra.com/store/games-with ... e-game-666

Try out Pixel Golf on the Scirra Arcade!

Pudgy Platypus Games website!
www.pudgyplatypus.com
B
61
S
22
G
5
Posts: 212
Reputation: 7,645

### » Tue Jan 20, 2015 3:47 pm

Use sin() to get the Y component.
B
81
S
33
G
27
Posts: 1,029
Reputation: 21,143

### » Tue Jan 20, 2015 5:30 pm

Ha! That's amazing, I will try that! I fell asleep a lot in my Trigonometry class...

Learn to make a clicker game for cheap!
https://www.scirra.com/store/games-with ... e-game-666

Try out Pixel Golf on the Scirra Arcade!

Pudgy Platypus Games website!
www.pudgyplatypus.com
B
61
S
22
G
5
Posts: 212
Reputation: 7,645

### » Wed Jan 21, 2015 8:14 am

lel, when you said "circle math" I thought about eating some pi. A nice apple pi would be so rad.
B
9
S
2
Posts: 80
Reputation: 864