Camera Position Issues

Hey guys,

Maybe some of you gurus can help me here. I’m still relatively new to UE4 and I really want to get an understanding for building materials. So my latest problem is the Camera position node. I’m trying to create a shader that fades to something else when you get closer. I know there is a camera fade node but I want to build one as an exercise. For some reason, despite the camera position being use as an alpha, Im getting colors I shouldn’t be getting. Here is a screenshot of whats goin on.

Thanks

Nobody knows, huh? Is this a bug?

CameraPosition is a float3. It’s where you camera is in worldspace, not the scalar distance between the surface and the camera. For that you want Distance(CameraPosition,WorldPosition).