Search Unity

Flashlight goes through walls

Discussion in 'Editor & General Support' started by jordywiering, Oct 21, 2019.

  1. jordywiering

    jordywiering

    Joined:
    May 21, 2018
    Posts:
    7
    Hey all,

    So I'm trying to make a simple game
    Made myself a flashlight with some cubes but I have this problem that when I walk in to a wall, my flashlight will go through the wall..

    I've tried putting on a collider on the entire flashlight but that didn't work.

    Any one knows how to fix this ? I'm still pretty new to unity.
    Thanks!
     
  2. dgoyette

    dgoyette

    Joined:
    Jul 1, 2016
    Posts:
    4,196
    You probably just need to enable shadows on the light itself. Without shadows, other objects won't block the light.