Dominic - V0.0.2 Devlog - Shadow Detection


One of the main mechanics in our game, Echo in the Shadows, is the ability for the player to interact with shadows to use abilities and stealth around levels. The challenge to this is how to get the game to register if a player is in a shadow or not. 

As I did research about how I could implement this, I came across something that would work perfectly. What I did to achieve this was use ray casts. The light sources in the level ray cast from their position to the players position. If the ray cast returns the player, they are considered in direct light and if the cast does not return the player, they are considered in a shadow.

The problem with this system was that the lights were constantly casting to the player using processing power. In order to fix this issue, I created a sphere collider that starts the ray cast so that the lights are not all constantly casting to the player.

Get Echo in the Shadows

Leave a comment

Log in with itch.io to leave a comment.