Calculating angle difference

Discussion and feedback on Construct 2

Post » Sat Sep 17, 2016 5:08 am

I'm trying to calculate the difference between 2 angles, but if i use the .angle expression, as you may expect, it doesn't work well, because it reaches 360 and then jumps to 0. So for example, is angle 1 is, say, 345, and angle 2 15, it calculate the difference of 330, while it is just 30.

Is there another way to do this?
B
66
S
22
G
4
Posts: 360
Reputation: 6,584

Post » Sat Sep 17, 2016 5:09 am

use anglediff(angle1,angle2)
B
125
S
43
G
41
Posts: 849
Reputation: 28,260

Post » Sat Sep 17, 2016 5:14 am

Wow, why didn't i find it, i've searched for hours for an expression xD ty!
B
66
S
22
G
4
Posts: 360
Reputation: 6,584


Return to Construct 2 General

Who is online

Users browsing this forum: No registered users and 2 guests