itch.io is community of indie game creators and players

Devlogs

Wall Occlusion

SPACEBLOOD
A downloadable game

In this first week of production there hasnt been many problems, but one I encountered was setting up the level blockout and realizing that I cant see the player through any of the walls, duh. So thats something I needed to fix. The reason this is an issue is because SPACE BLOOD is an ARPG with a top down camera angle fixed in place, so if we want any complexity in our map and not just an open field this is something that needs to be fixed.

I did this by adding to the PlayerCamera Tick() method (the camera is not attached to the player character as it usually is. we need it this way for a future feature we plan on implementing) a sphere trace, simply checking if anything is blocking the trace from the camera to the player character. I created a new trace channel and set all the wall meshes to block that channel which is what the sphere trace was using.
a fairly simple fix. I would like to make this more polished, as of right now it just disables the meshes visibility, I would like to make a cool transparent effect so you can still tell theres something there, but this works for the prototype. 

Leave a comment