jwfwessels / AFK

Automated Battle Ground.
MIT License
1 stars 1 forks source link

visibility of entities should be based on their bounded sphere not point of origin #5

Open jwfwessels opened 11 years ago

jwfwessels commented 11 years ago

sketch

currently red entity can only see the blue entity. This is because visibility is calculated between two entities points of origin (black dots in entity squares). This should be enhanced to the point where the green and yellow are also visible based on their bounding spheres.

danini-the-panini commented 11 years ago

This could be done by using a plane and sphere intersection, combined with the physical distance from the red entity to any other entity minus the radius of each.