The service is unavailable.

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
3
Posts: 152
Reputation: 2,971

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
83
S
27
G
69
Posts: 4,905
Reputation: 48,977

Post » Wed Mar 04, 2015 8:27 pm

Rojohound;

Thats a very good idea.
Thanks alot.

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


Return to Beginner's Questions

Who is online

Users browsing this forum: No registered users and 0 guests