Plane lookat camera's rotation with fade in/out

I am using an ArcRotateCamera() function in my scene along with a plane with image texture. I am trying to use LookAt() function for the plane to always follow camera’s rotation. It does not really work. What am I doing wrong?
Also, how do I fade out the plane with image slowly?
Link:
https://playground.babylonjs.com/#YDO1F#448

lookAt needs a position, not a rotation. You should pass it camera.position instead of camera.rotation.

Note that you can also use the billboard property if you want to always have your plane face the camera:

plane.billboardMode = BABYLON.AbstractMesh.BILLBOARDMODE_ALL;
1 Like

Cool! Thanks a lot!. I did not know about Billboard. I am learning a lot on Babylon these days.

Is it possible to make the object lookat or rotate towards camera only in Y axis? Also my mesh seems to be 180 degrees rotated to the opposite side. How can i fix this?

You have different billboard modes:

Just apply a 180° rotation on the Y axis (see screenshot above).

2 Likes