Log in or register to post comments

How do I stop 3D object from rotating/changing position on demand

November 6, 2017 - 8:21am #1

Hi guys,

 

I really need some urgent help on the yellow highlighted text. Is there a way or script that can guide me through? Appreciate everyone's help please

1) Target has been recognised (using model target)

2) 3D Object drawn (I want to have the option to turn on/off either position or rotation tracking on my canvas - on demand) 

 

-Benjamin

How do I stop 3D object from rotating/changing position on demand

November 20, 2017 - 5:04pm #5

There isn't an available script that we have that would accomplish this behavior, but I do have some ideas as to how you could write one for your app.

If you set the World Center Mode to Camera, this will ensure that the camera is placed at 0,0,0 and all other objects will be in position relative to this. With this in mind, you'll be able to calculate the direction vector from the model to the Camera (or 0,0,0 world center). This direction can be used with Unity's "Quaternion.LookRotation(vector3)" function to rotate your model to look at this given direction.

This Unity Answers thread has some more information about that function: https://answers.unity.com/questions/62687/aligning-an-objects-rotation-direction-to-a-vector.html

You'll want to run this code every frame when your object is detected in order to keep it pointing at the camera.

Let me know if you have any further questions,

Thanks

-Vuforia Support

How do I stop 3D object from rotating/changing position on demand

November 20, 2017 - 1:40am #4

Hi Strasza,

Yup! How can I do that? Is there some some of available script?

Thanks Strasza!

How do I stop 3D object from rotating/changing position on demand

November 14, 2017 - 10:44am #3

Hello Benjamin,

Are you referring to the rotation of the model that is augmented on the target? Are you wanting this to always face the same direction regardless of the rotation of the target?

Thanks,

-Vuforia Support

How do I stop 3D object from rotating/changing position on demand

November 13, 2017 - 4:21pm #2

While tracking target, Is it possible to turn off rotation updates only and leave the position updates on?

Log in or register to post comments