I’m trying to implement a sight for units in my game. Currently, there’s a ghost control object with a cone shape to simulate the sight. I’m also using a ray cast to test if the units in the field of view are obstructed or not.
However, because the sight extends far and wide and also because bullet physics only uses AABB from ghost objects to test intersections, what the unit with sight sees is ultimately wrong.
I’d like to have a cone collidable to actually intersect units in the sight (if there were also previously intersected with the cone’s AABB).
Is there a way to do that?