Log in or register to post comments

AR Asset Always Face User

August 25, 2011 - 11:48am #1

Is this the best resource for relative ImageTarget rotation?

http://unity3d.com/support/documentation/ScriptReference/Transform.InverseTransformPoint.html

Re: AR Asset Always Face User

August 29, 2011 - 9:44pm #4

No, that's just the general concept. Your script will need access to two transforms to compare (a and b in the given snippet). See the Unity documentation on accessing other game objects for more info:

http://unity3d.com/support/documentation/ScriptReference/index.Accessing_Other_Game_Objects.html

You can attach the final script to the ARCamera or a trackable.

- Kim

Re: AR Asset Always Face User

August 28, 2011 - 3:30pm #3

Many thanks. Is this the entire script? Do I attached script to the AR Camera?

Re: AR Asset Always Face User

August 28, 2011 - 11:09am #2

To get the relative rotation between two transforms you can use this:

Quaternion relative = Quaternion.Inverse(a.rotation) * b.rotation;

- Kim

Log in or register to post comments