I'm trying to rotate an object which I have got attached to a marker towards the camera. Like a billboard which should always be readable. I know this question pops up again and again but I still cannot make it work. At first, when the marker is stationary on the table it seems to work but after I've rotated the marker a couple of times the orientation of the billboard is completely off.
Ideally, I want place a flagpole on my Vuforia marker and then have the flag itself rotate towards the camera as much as possible whilst the flagpole itself stays normal to the marker.
My ARCamera is set to FIRST_TARGET. Is this not correct?
Can anyone point me in the right direction?
var newRotation = Quaternion.LookRotation(transform.position - Camera.main.transform.position);
//newRotation.x = 0.0f;
//newRotation.y = 0.0f;
transform.rotation = newRotation;