Can you make a Plane FACE the camera via it's Material only?

Thanks, thats the exact same math nightmare I ran into when trying to solve this lol. :dizzy_face:

I did find a solution, it was “hidden” in the Content Examples project (of course :sweat_smile:):

It’s deep within the Math_Hall level (3rd to last demo 2.20), name of the material is “M_Camera_Vector_to_Object”.

M_CameraVector_to_Object_Material

Here’s the material for it, hooks right up to WPO:

Note: I don’t know what the unconnected 1,1,0 vector multiplied by ThirdOrthogonal Vector3 does or where it goes, but I left it in for completeness.

Info:

  • To see it update in editor, I had to change the Actor Position node to a Object Position node.
    fc_swap_actor_pos_to_obj_pos

  • Width and Height control the scale of the object that the material is applied to.

  • To make it scale from the center, subtract 0.5 from TexCoord of Y axis.
    fc_subtract_5_from_texcoord

  • To control scale with Transform > Scale in the editor, multiply width by ObjectScale > X, multiply height by ObjectScale > Y (or Z).

3 Likes