How to make a texture to always face the camera?

Thanks a lot! this works perfectly. I only needed to change the second vector on the “createThirdOrthogonalVector” to 0 0 1
I have no idea why.

most likely its because at some point in the engine one of the vectors is flipped from default, so it makes it tricky ever time you are doing an inverse or transform into another space without the flip.

I believe the main reason is because normals are ‘untransformed’ when the camera is looking down.

Also in the image I gave, if you use 0,0,1 you just have to flip the other negatives floats on the multiplies. So those would become -1, 1, -1 instead of 1, -1, 1. Of course I could be wrong since I haven’t tried it today :slight_smile:

btw easier way to debug this is not by viewing lighting, but by viewing the normal map and then going into photoshop and seeing one channel at a time. makes it very obvious which channels need flippin.

RyanB, thank you so much. This is exactly what I am looking for to face my materials in front of the camera. Regards!

Please can you upload a .rar with a project containing this functionality (If it is possible)? I can’t get it working.

Now if only we could get meshes to contain FLinearColor we could encode the centers in that…