How do I get angle subtended by sprite?

Just started using Construct 2? Post your questions here

Post » Wed Mar 04, 2015 6:13 pm

Hello;

I want to know how much (start degrees to end degrees) a sprite subtends from a point of view at viewx,viewy.
Close sprites will take up bigger angles than ones further away. So a box might take from 10degrees to 37degrees of my "view". As it moves away it would only take 13degrees to 32degrees.

Thanks for your time.
yous
Winkr7
B
31
S
8
G
3
Posts: 159
Reputation: 3,210

Post » Wed Mar 04, 2015 8:13 pm

Here's one way. Find the angle from the point to all the corners of the sprite and then only keep the more clockwise and counter-clockwise angle. The difference of the angles is then the subtended angle.
You do not have the required permissions to view the files attached to this post.
B
89
S
30
G
95
Posts: 5,157
Reputation: 63,450

Post » Wed Mar 04, 2015 8:27 pm

Rojohound;

Thats a very good idea.
Thanks alot.

yours
Winkr7
B
31
S
8
G
3
Posts: 159
Reputation: 3,210


Return to Beginner's Questions

Who is online

Users browsing this forum: No registered users and 2 guests