How do I code an exit to shine light at the player like its the sunlight shining out at the player through a doorway?

How do I make an object cast sunlight on a specific area to make it seem like you are about to enter the outside world after being trapped in a building?

Please, I have tried everything and teacher said that he was kind of new to it and didn’t really know what to do at all. Thank you for your time.

Can you give an image example of what you are meaning? It’s easy to misinterpret what you want, and having a visual example will make it quicker to get an answer.

images (11)

that is what its suppose to be like and it has walls on the sides that prevent the light from going through an object.

I would use a light object and light obstacle objects:


The red X is where I’d place the light object. The red panels/walls would be made up of light obstacle objects. You can hide the light obstacle objects and they will still block the light; they just cannot be seen on the screen.

1 Like

I am making a maze game. Also the walls are not right where you put it. Its a 3D maze and the high walls are on the uhh picture thing here.

images (11)

You can still use the same technique if the doorway straight in front. It’ll get tricky/messy if the opening is on the side wall - lights are a 2D feature. They’re not designed to work in a 3D environment.

the opening is where the roof is suppose to be.