Is there a complete script that one can apply to the AR camera in Unity that will serve as a kind of "face me" script? In other words, when the user walks around the model, the front of the model always faces the users camera vision so the the user always see the same side of the model?
- Sort Posts
- 6 replies
- Last post
Re: Face Me
February 14, 2012 - 7:01pm #5
Ah, you need to call this after the tracker has had a chance to update all the scene objects. Either use the LateUpdate method, or the OnTrackablesUpdated callback of the ITrackerEventHandler interface. See the ImageTargets sample for a sample script that implements this interface (Scripts/TrackerEventHandler).
- Kim
Re: Face Me
February 14, 2012 - 4:24am #3
You should be able to use the camera's transform for this. Something like this:
myModel.transform.LookAt(Camera.main.transform);
Does that work?
- Kim
Hii,
This doesnt seem to work for some reason. Any ideas why? For a simple test i tried the ookat function on the teapot provided in the sample scene. Doesn't seem to do anything
Any clues on this would be helpful
Try adding a script like this to the model:
- Kim