How do I make my billboard that the x is not moving so it does not look wierd, right now it rotates too which I do not like.
CODE:
private void Object_Billboard(){
transform.LookAt (transform.position + playerTarget.transform.rotation * Vector3.down, playerTarget.transform.rotation * Vector3.back);
}
I still cannot visualize your specific situation. But let me show how it would be done for some common scenarios, and you can translate into your object configuration.
Imagine a camera and a Quad. In a Quad, the visible surface is the back. If you were to billboard but only rotate on the ‘y’ axis regardless of the camera angle (and the Quad lived on the XZ plane), you would do it this way:
var v = Camera.main.transform.forward;
v.y = 0;
transform.rotation = Quaternion.LookRotation(v, Vector3.up);
If this was a normal game object in which you wanted to face the camera, the change would be:
transform.rotation = Quaternion.LookRotation(-v, Vector3.up);
Your situation is different, so how you apply this logic will be a bit different. The two important points are are 1) the projection of the point onto a plane by zeroing out one component of the look vector, and 2) the second parameter to the LookRotation being the axis you want to rotate around.