Shadows disappear after building the lighting

Ok so I tested it on a smaller wall and it still didn’t work until I moved everything forward and then it worked. I noticed that as I moved the wall and light backwards then it looked like the shadow was being cut off as if there was another cube that was cutting off the shadow. I then put the wall back to its original position and removed all the objects from my map except for the light, wall, and cube and the shadow appeared but only on the smaller wall.

When I tried this again on the bigger wall, the shadow didn’t appear so I took the smaller wall and slowly made it bigger and the bigger the wall got, the more the shadow was distorted until it disappeared completely. So it looks like the size of the wall is a factor here.

I also used static lighting and it had similar effects where the location and size of the wall matters (except it was quite pixelated). So the two main things are that there appears to be an object in my map that gets rid of the shadow but I don’t know which one it is and the wall needs to be small but I want the wall to be large. So what do I do about that?

Ok so I found the object that made my shadows disappear but we still have the problem of the shadow only appearing on small walls but not big ones. How do I fix that problem?

So I’m attempting to cast dynamic shadows that look something like this:

I want the shadow to be generated by the cube. For some reason after I build the lighting, it looks like this:

The light is stationary and the shadow seems to disappear after I build the lighting. The shadow works if the light is movable but not if it’s stationary. I don’t really want to make my lights movable because I feel it would affect the performance. So is there a way to make shadows like the first picture without having to make my lights movable?

Double check that your wall’s geometry has lightmap UVs and enough lightmap resolution to catch that shadow.

The wall is just the basic cube that I put a texture onto. Apparently if you make the cube and wall moveable then the shadow appears but the draw distance is quite short. I also have another custom mesh where I’m doing something similar yet the light seems to go right through it. Even stranger is I created a new project and imported my custom mesh into it and the shadows seemed to work for stationary lighting. So how come it’s not working for my other project?

You should account for the specifics of stationary lights. They rely on the static lighting for the most part but also support casting shadows from dynamic objects. There’re also preview shadows that you see before the static lighting is built (that’s what you see on your first screenshot).

I’d recommend changing that light to a static light first to eliminate all the extra factors that come with stationary lights first.

Next, you have to prepare your static meshes for static lighting by adding lightmap UVs (this can be done semi-automatically when importing the mesh, just make sure to check the appropriate checkbox) and setting their lightmap sizes large enough to capture the lighting/shadow information (min 64 for your case if you’re fine with a soft shadow but might have to be larger for a crisper shadow, depends on your needs and texture memory budget).