DistanceToNearestSurface not working correctly

So I have this very basic material

It was working earlier, but now all of a sudden

The edges around the mesh are glowing, and moving it makes it flicker like crazy. It no longer detects intersecting objects anymore but seems to be detecting itself.

I’ve tried restarting unreal and turning distance mesh fields on and off, no matter what I do I can’t get it working properly anymore.

The Distance Mesh Fields look fine in the visualizer, so I’m not sure why ‘DistanceToNearestSurface’ won’t work in any level in my project. It works fine in other projects, but not mine.

Any ideas?

Figured it out, the object used needs to have shadows turned off, completely forgot about that.

Gonna leave this here in case anyone gets the same issue.

Did you find anything else about this? I have shadows off but it always returns 0 no matter what.

Hey Burnrate,
It needs to both be enabled in your project settings, and shadows need to be set to epic quality.