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
Posts: 85
Reputation: 395

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
62
S
26
G
24
Posts: 953
Reputation: 18,316

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
Posts: 85
Reputation: 395


Return to How do I....?

Who is online

Users browsing this forum: marcoscodas and 11 guests