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
34
S
8
G
3
Posts: 169
Reputation: 3,305

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
92
S
32
G
106
Posts: 5,272
Reputation: 69,455

Post » Wed Mar 04, 2015 8:27 pm

Rojohound;

Thats a very good idea.
Thanks alot.

yours
Winkr7
B
34
S
8
G
3
Posts: 169
Reputation: 3,305


Return to Beginner's Questions

Who is online

Users browsing this forum: No registered users and 1 guest