Material WPO causes material to clip through walls

Hello people who are smarter than me! I am currently making a cloud material that should have sort of accurate collisions. I got everything working and the material looking good but I’m struggling with the fresnel node and the size of the mesh.

Basically, when using the fresnel node, the material looks like it’s slightly moving. When your close to it it comes at you, when your far away it goes backwards. This makes it look wonky when standing on the material as it moves when you look around.

Look at it in relation to the collision box you can see. First picture is close up and second picture is far away.

Notice how the material looks like it’s moving a bit with the camera. I managed to kind of solve this with this piece of code plugged in to WPO.

The problem now is that because this code moves the material away from the camera, it can sometimes move through walls making it look like this:

In this picture you can see that the collision box is in front of the wall but the material is behind it. How can I solve this? Can I maybe squish the material instead of moving it some how?