AR Object Should Not Move Using Vuforia Unity3d AR Camera

I am working on the Vuforia SDK in that I have one 3D model in camera view.

But when I move my device, the 3D model also moves with this kind of camera. I want this 3d model to not change its world position until I drag it or move it.

How can I make an AR object independent of AR Camera View?

If anyone has an idea, please help me. and I do not want to use any purpose. I want to swim my object in the world.

Edit:

So far, I have tried to add a second normal camera with the same position and field of view.

then add a layer to this AR object and set this layer to the reject mask of a regular camera. The AR camera cannot see this object. Then also the object moves with a camera view.

Thanks.

+5
source share
2 answers

I think I may have a solution to this. Assuming you are using some kind of target, select your ARCamera and view the inspector panel.

In the QCARBehaviour section, you will see World Center Mode

Change this value to a specific object (it should NOT be a camera)

Hope this helps.

+2
source

There are two solutions to achieve the result as you want. But ... Very IMP . What you are trying to do is not augmented reality, just 3D rendering, and you can do the same without using vuforia, not even a marker. you can just use image processing (OpenCV)


Solution 1: select ARCamera in your scene and set the World Center mode (in the inspector) to CAMERA (instead of FIRST_TARGET) [despite the fact that your child should not be a child of ImageTarget]


Solution 2: Inspect the ImageTargets TrackableBehavour at runtime, then get the Transform component and extract the position and orientation from that Transform into World Coordinates (i.e. using Transform.position and Transform. Rotation):

Then you can set the position and orientation of your object, removing it from one of the monitored ones (for this you need to write a custom script).


But this is not AR in any point of view, because his view is somehow so. https://youtu.be/iHhMCdh3k7U

The right decision:

1 - Select the ImageTarget that you placed in the scene.

2 - In the inspector, go to the Image Target Behavior component for the script component and activate the property: Enable advanced tracking

Best luck!

0
source

Source: https://habr.com/ru/post/1214066/


All Articles