Mesh with lookAt camera axis orientation shows the back of the mesh

I’m creating a floating menu button that will be visible at all time to the camera,
I was wondering if there is a way to create the button containing plane mesh with the orientation of the axis to be backwards.

My Question comes from the fact that mesh.lookAt(camera) will show the text of the button backwards.
I want to create a mesh with a pivot to the axis origination in a way that I wont have to do a rotate of the plane mesh before every frame rendering.

I’ve created a Playground that will elaborate what I meant:

In addition to that,
how can i fix the place where the button is seen when the camera moves?
I’m trying to keep it in a fixed position on the screen regardless the camera movement.

It might be odd and simplistic to say (dare I :thinking:), but what about just setting the width of your plane to minus?

You could try using lookAt then adding Math.PI to the rotation.y (to flip it around).

Good one, nice trick.

Works for me.

The solution you suggested is the correct one,
the problem is that in my scenario I will need to do it each frame before rendering as an additional step for a CPU processing, I was looking to do something in a single processing step and not to solve it in the before rendering of each frame of the scene.


1 Like