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
26
S
7
G
2
Posts: 152
Reputation: 2,471

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
82
S
26
G
62
Posts: 4,828
Reputation: 45,196

Post » Wed Mar 04, 2015 8:27 pm

Rojohound;

Thats a very good idea.
Thanks alot.

yours
Winkr7
B
26
S
7
G
2
Posts: 152
Reputation: 2,471


Return to Beginner's Questions

Who is online

Users browsing this forum: Iftikhar555 and 0 guests