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
40
S
11
G
5
Posts: 180
Reputation: 4,777

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
101
S
39
G
134
Posts: 5,591
Reputation: 85,520

Post » Wed Mar 04, 2015 8:27 pm

Rojohound;

Thats a very good idea.
Thanks alot.

yours
Winkr7
B
40
S
11
G
5
Posts: 180
Reputation: 4,777


Return to Beginner's Questions

Who is online

Users browsing this forum: No registered users and 0 guests