How can I mask textures in a cone?

Hello everyone,

Is there any way I can achieve the same effect as in this video, but in a cone shape as opposed to a sphere? I want a flashlight to reveal objects withing its cone for all players to see.

Any advice would be appreciated, thanks!

There have been a few people before you who have tried. If you want to get something to get you started, I recommend checking out these;

https://forums.unrealengine.com/development-discussion/rendering/115679-3d-capsule-cone-mask-in-material-solution-for-seeing-through-obstacles

If that doesn’t get you what you want, you may want to check out the math on this page as well. Most if not all of these should be implementable using purely the material functions already present. For the ones that don’t, you could always use a custom node instead;

Well I thought it was interesting, I made a cylindrical mask that can sit at an absolute position in the world, however I have no idea how to make this cylindrical mask rotate to the cone of the flashlight. The links posted only detail how to make a shape, and then transform to camera space, so it would not work for other players to see.