New answers tagged frustum
The best way to solve this is not with trigonometry, but with vector math! I'm going to write some quick pseudocode of what you need to check for difference in angles, if you want the juicy details of the whys and hows scroll further down. Summary: float l1x = entity.getPosition().x - player.getPosition().x; float l1y = entity.getPosition().y - ...
Top 50 recent answers are included