More maths needed!

Get help using Construct 2

Post » Mon Jun 10, 2013 8:24 pm

Hi guys!

I'm pretty sure the problem I have can be solved with a nice bit of maths.

I have a platformer level where the player must walk around the edge a 2d circle.
So the angle of gravity must always be towards the center of the circle.
I can set the angle of gravity each tick, but I'm not sure what the formula is to calculate the required angle from the X/Y coordinates of the two objects.

Cheers!
B
5
S
1
Posts: 85
Reputation: 545

Post » Mon Jun 10, 2013 9:16 pm

There is a nifty little built-in function that returns the angle between two points. Check it out on this page ! It's under "Math". Magistross2013-06-10 21:16:32
B
74
S
31
G
26
Posts: 994
Reputation: 20,198

Post » Mon Jun 10, 2013 9:42 pm

Not only is that page really useful, but it solved my problem!

Thanks so much!
B
5
S
1
Posts: 85
Reputation: 545


Return to How do I....?

Who is online

Users browsing this forum: minigame, R0J0hound and 19 guests