Greetings
Found a very helpful snippet of code on the community wiki:
void Update()
{
transform.LookAt(transform.position + m_Camera.transform.rotation * Vector3.back,
m_Camera.transform.rotation * Vector3.up);
}
My question is why does this work and actually make the UI element always face the camera? Could you explain how the math on this works?
Its a really short solution and I love how concise it is, but I can’t wrap my head around how it works!