Download

Trying to figure out character FOV for Top down camera

As mentioned in the title I am hoping to figure out how to cast dynamic shadows from a characters field of view. It would be similar to attaching a point light to the top of a character as shown here:

2016-08-30_2125.png

The problem is I do not want it to be a light I just want the shadows and I do not want it to effect lights or be effected by the lights in the level. Basically I am trying to achieve a 360 degree field of view from the characters perspective while viewing from a top down camera. So shadows should actually be completely black with no visibility on the other side of objects/buildings/whatever the character is standing behind.

Is there a way to set the camera to only show what is visible from the character? or possibly put in dynamic shadows that over-ride the lights?

GameDev.net -- Dynamic 2D Soft Shadows Figure out shadow geometry and render that top of the scene without depth testing.

Awesome information. I am still fairly new to programming C# so it is going to take me some time to figure it all out but this is a feature I need to work on asap. Thanks for your help.

I have been thinking about it and the amount of time it will take for me to make it myself will likely be much longer then it would cost me to buy this from the store:

(ignore the name it is basically exactly what I am looking for with some extra features, not really fog of war)

Figured I would post it here in case anyone is looking for a similar solution. For $15 it seems well worth it compared to the time required to make it.

Do you want the top of the cubes that are higher than your character to be covered with shadow / fog aswell? In case you do you might want to check this one out.

https://youtube.com/watch?v=zfMD6hN2kR8