- Home /
Calculating the amount of "cover" a selected character has
In the game I'm making I want to determine the amount of cover a character is in from a certain viewpoint of another character.
The two ways I can think of:
1 - high accuracy. to try to find the number of polys that character has which are front facing, then taking away the number of occluded front facing polys to get the percentage cover of that character.
2 - low accuracy. Divide characters into a tree of bounding boxes over each limb/area. Then raycast to the corners of each box to check occlusion. Compare with total number of corners to get percentage cover.
Easier/more efficient ways to get the same result are very welcome.
Your answer
Follow this Question
Related Questions
Help with a field of sight 3 Answers
Custom Collision Detection 4 Answers
Collision Detection If Raycast Source Is inside A Collider? 4 Answers
Camera raycast? 2 Answers