Object is between two angles of another object

Just started using Construct 2? Post your questions here

Post » Wed Feb 17, 2016 3:08 pm

In sprite conditions there is "is between angles", but i am not sure how to relate it to other object
For example
Sprite1 is between 0 and 90 degrees of Sprite2 :: (action goes here)
Thanks, i hope you understand what i am saying
B
7
S
2
Posts: 102
Reputation: 975

Post » Thu Feb 18, 2016 12:04 am

You need an expression to get the angle between Sprite1 and Sprite2 with a little math using arctangent (atan(x)).

The angle between the two is atan((Sprite1.Y-Sprite2.Y)/(Sprite1.X-Sprite2.X)).


Edit: Never mind!! I didn't even realize there was a specific angle expression for that. Angle(x1, y1, x2, y2) - Calculate angle between two points
Mistakes were made.
B
47
S
23
G
107
Posts: 1,571
Reputation: 60,133


Return to Beginner's Questions

Who is online

Users browsing this forum: No registered users and 3 guests