Download

Dynamic Spotlight shining through walls (Oculus Quest)

I’m currently prototyping in UE4 (4.25 Oculus branch) for Quest 2. Navigating in the dark with a flashlight is a major part of the game concept but we’ve already hit a snag early in our prototyping phase.
Dynamic spotlight works fine when previewed from the editor on PC, but as soon as the project is built and deployed on a Quest 2 the spotlight shines through walls. Is there some setting that I’m missing or is this simply a limitation by Unreal Engine on mobile hardware? I’m not expecting to get realtime dynamic shadows, but at least not have my lights shining through solid walls on the other side.

Here is a video of the issue at hand:
[video]www.youtube.com/watch?v=vHEmML87Mnw&ab_channel=Designbykivi[/video]

Dynamic shadows is generally what prevents lighting from passing through walls though.

There is an experimental option to turn on spotlight shadows on mobile:

Yes, seems like “SpotlightShadows” was just added in 4.26 and was not an option before. Before we could only enable the movable spotlights but they didn’t cast any shadows. I’m updating to 4.26 from 4.25 as we speak and hopefully this can be marked as solved. I’ll come back asap with my findings, as I also have to rebuild the engine first and deploy the project on the Quest.

Edit:
Can confirm: In UE4.6 shadowing works on mobile (at least on Quest 2) on movable spotlights. It’s performance heavy (as expected) so just keep that in mind.