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
65
S
22
G
4
Posts: 358
Reputation: 6,555

Post » Sat Sep 17, 2016 5:09 am

use anglediff(angle1,angle2)
B
123
S
43
G
41
Posts: 847
Reputation: 28,206

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
65
S
22
G
4
Posts: 358
Reputation: 6,555


Return to Construct 2 General

Who is online

Users browsing this forum: No registered users and 9 guests