Steven
Steven

Reputation: 39

Light in one direction in Unity

I'm making a soccer stadium, with lamps to shine on the pitch. The lamp now contain cubes, with a point light inside. I hoped that, when I put the point light inside the cubes (in the empty space, inside the 'walls' of the lamp), the light would shine only to the pitch. Because only this side of the cubes is 'open'. But it's still a 'light circle'.

This is what I have now:

Click

What I want:

Click

Could anyone tell me how I can do this?

Upvotes: 2

Views: 350

Answers (1)

Flavien Marianacci
Flavien Marianacci

Reputation: 149

Use spotlight instead of point light. Spotlight is use for lighting in a precise direction.

And check the culling mask on your light. If the cube's layer is not include in the light culling mask, then the light will not care about your cube. The shadow type use by the spotlight can also change the way the light look on your cube.

Upvotes: 3

Related Questions