I have a character and camera actor facing that character as shown below.
I also have a directional light which changes its Rotation based on user input. When the directional light’s direction is parallel to the camera, the camera is blocking some of the light rays and casting a shadow on the character which is physically plausible (as shown below).
However, I would like the camera to be completely transparent and not block any light. I understand that this is not physically plausible and but would still like to do it. If I was dealing with a point light, I would just relocate the point light to be in front of the camera to deal with this use case, but this technique will not work for a directional light.
Actually, the shadows were not being cast by the camera. A default pawn was being spawned when the game started which was casting the shadow. Destroying the default pawn fixed the issue.
I did the following in level blueprint, maybe there is a better way to do this in C++.
Thanks for the reply! I tried to set the DefaultPawnClass to Pawn and None by following this but the shadow was still there.
I understand that there might be some unintended consequences of deleting the Default Pawn, but I am not really building a game and hence don’t have a Pawn Class to use for that field.