Log in or register to post comments

LookAt (GameObject)

April 30, 2018 - 3:29pm #2

Hi,

i have 2 ImageTargets in my scene. 

I'm trying that both GameObjects are constantly facing each other.   (like in this video: https://www.youtube.com/watch?v=Z-rJGOgoTzo  )



Without Vuforia this works with:

  transform.LookAt (GameObject.FindGameObjectWithTag ("enemy").transform.position);

  transform.eulerAngles = new Vector3 (0, transform.eulerAngles.y, 0);

 

Any ideas how i can do this with vuforia?

Thank you.

 

 

 

 

 

 

LookAt (GameObject)

May 2, 2018 - 1:06am #1

One way to do this is creating another gameObject (with your model and renderer in this one) and assigning to this gameObject the position of the gameObject that Vuforia is taking care of. And for the rotation you can now use the LookAt method you talked about.

 

Pierre

Log in or register to post comments