- Home /
Image sequence panel always face the AR Camera
I have an AR marker that will be placed on a table. As soon as the marker is detected a quad comes up and starts playing the image sequence.But the panel is always straight and the image sequence is not clear when we move away from the marker.I want the panel to always face the direction of the AR Camera. How can I achieve this?
Answer by robertbu · Nov 20, 2014 at 05:24 AM
I don't have a lot of hours playing with Vuforia, but the standard setup move the camera, not the object. So in order to get something to face the camera, you can use any standard billboarding logic. What logic will depend on the effect you are looking for. Here are three that assume a Unity Quad (will work for a Sprite as well). 'camTr' needs to be initialized to the transform of the ARCamera, and each must be executed each frame:
transform.rotation = camTr.rotation;
....number 2:
transform.rotation = Quaternion.LookRotation(camTr.position - transform.position);
....and number 3:
var dir = camTr.position - transform.position;
dir.y = 0.0;
transform.rotation = Quaternion.LookRotation(dir);
Each of these will have a different look and feel, but all will face the object towards the camera from most angles.
Your answer
![](https://koobas.hobune.stream/wayback/20220613171959im_/https://answers.unity.com/themes/thub/images/avi.jpg)