Pinched this from Tomas on the houdini forums.
This is useful for moving stuff in and out of camera space, but maintaining the "2d" flat appearance of an object.
Plug this into a point wrangle-
string cam = "/obj/cam1";
@P = toNDC(cam, @P); // to ndc space
@P.z *= 0; // flatten
@P.z -= chf("depth"); // set depth
@P = fromNDC(cam, @P); // if you need bring back in front of cam
i've changed the set depth to a float slider to be a bit more interactive, you could just put a hard value in.
the fromNDC(cam,@P) part is the line that brings your object back in front of your camera...otherwise toNDC just exists somewhere near the origin.
the @P.z*=0; to flatten is entirely optional... you can use this script to move things around in "camera z"