I am making a fake Flashlight effect In Unity

I made a cone mesh and placed it into In VFX Graph . Now i wants to Give a life to it by interacting with the walls and I need a technique to hide mesh going Outside the wall using Shader graph or VFX graph itself. @GabrielAguiar do you know any technique?
image

you need a script that will pass the distance to the collider to the material.