The 'part' of the camera that will be used in the collision detection is the yellow 'rectangle' or the near panel of the viewing frustrum. I figure that if any part of this rectangle is 'colliding' with an actor or environmental object, the the vision will be obstructed. If this assumption is incorrect, please let me know.
So heres basically what I figure i will do:
1) do a quick boolean intersection test. Is any part of the near 'yellow' panel embedded in an object. If no, leave the camera as is. I with use my GJK-SAT algorithm for this.
2) if the GJK-SAT returns true, it is intersecting. I could either:
- A) move the camera to the furthest non-intersecting position from the player
- B) move the camera to the closest non-intersecting position from the player.
Im leaning towards option B. I think thats how most game cameras deal with intersections. Either way im doing a swept rectangle test. Except for option B i use the furthest position instead of closest.
What do you guys think? Would this produce satisfactory results? Is there a more efficient way?
Thanks for any help!