Fix billboardbehaviour being flipped

This commit is contained in:
2023-07-09 11:05:43 +02:00
parent ee62e86863
commit 9114b0a5fa

View File

@@ -14,7 +14,7 @@ public class BillboardBehaviour : MonoBehaviour
// Update is called once per frame // Update is called once per frame
void Update() void Update()
{ {
transform.LookAt(Camera.main.transform.position); transform.rotation = Quaternion.LookRotation(transform.position - Camera.main.transform.position);
transform.rotation = Quaternion.Euler(new Vector3(initialRotation.x, transform.rotation.eulerAngles.y, initialRotation.z)); transform.rotation = Quaternion.Euler(new Vector3(initialRotation.x, transform.rotation.eulerAngles.y, initialRotation.z));
} }
} }