Skip to content

Initial implementation of indoor camera. Enclosure detection and camera switch

Joey Maher requested to merge averylostnomad/indoor-camera into master
  • By opening this merge request, you agree to release your code and all other changes under the GPL 3 license and to abide by the terms set by this license.
  • Significant changes of this merge request have been added to the changelog.

Fixes #512 (closed) Essentially, we use rays from the camera to periodically check if the player is mostly inside a structure. If so, we move from the normal raycast (puts camera in the first empty space between camera and player) to a full "edge-case" (puts camera in the last empty space between camera and player). This has the effect of simulating the camera colliding with interior walls.

I've tested fairly extensively myself, but it would be great if others wanted to. The numbers I've arrived at worked for my setup with no noticeable performance impact, but there's a chance we would need to make some kind of enclosure quality slider that changes one or more of the associated variables.

Edited by Justin Shipsey

Merge request reports