Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

AR Object Should not move with AR Camera Vuforia Unity3d

I am working on Vuforia SDK in that I have one 3d model in AR Camera view.

But when i move my device , 3d model is also moving with that AR Camera view. I want that 3d model should not change its world position until i drag it or move it.

How can i make AR object independent of AR Camera View?

If anyone is having idea then please help me. and i don't want to use any target . i want to float my object in world.

Edit:

Till now i have tried by adding second normal camera with same position and field of view.

then added layer to that AR object and set that layer to the culling mask of the normal camera. AR camera can't see that object. Then also object is moving with camera view.

Thanks.

like image 436
Zankhna Avatar asked Feb 24 '15 10:02

Zankhna


People also ask

Which is better AR Foundation or Vuforia?

When it comes to Vuforia vs AR Foundation for manufacturing AR the answer is clear – Vuforia is the solution you need. AR Foundation is a great platform but it's best for games and other lightweight solutions and won't have the tools required for industrial needs.

Does Vuforia use Slam?

Visual-Inertial Simultaneous Localization And Mapping (VISLAM) is an algorithm implemented by Vuforia combining the benefits of Visual-Inertial Odometry (VIO) and Simultaneous Localization And Mapping (SLAM).

Is Vuforia marker based?

Marker-based tracking When your device's camera recognizes these markers in the real world (while running an AR or MR application), this triggers the display of virtual content over the world position of the marker in the camera view.

Can Vuforia work offline?

Prerequisites. The offline MTG limits the communication to the Vuforia servers down to a complete air-gapped environment depending on the method you choose to sign generated model targets with. Use the offline MTG with: A secret key pair to work in complete air-gapped environments.


2 Answers

I think I might have the solution to this. Assuming that you're using some target of some sort, select your ARCamera, and view the inspector panel.

Under QCARBehaviour, you'll see World Center Mode

Change that value to Specific Target (it should NOT be Camera)

Hope this helps.

like image 100
Augmented Jacob Avatar answered Nov 22 '22 06:11

Augmented Jacob


There are 2 solutions to achieve the output as you want. But...

Very IMP: What you are trying to do is not an Augmented reality, Its just 3D rendering and you can do the same without using vuforia not even marker too. you can just use Image processing (OpenCV)


Solution 1: select the ARCamera in your Scene, and set the World Center Mode (in the Inspector) to CAMERA (instead of FIRST_TARGET) [while doing same your child must not be child of ImageTarget]


Solution 2: Inspect the ImageTargets TrackableBehaviour at runtime, then get the Transform component of it, and extract the position and orientation from that Transform, in World Coordinates (i.e. using Transform.position and Transform.rotation):

You can then set the position and orientation of your Object by deriving it from the one of the Trackable (You have to write custom script for this).


But its not an AR in any view because its look somehow like this. https://youtu.be/iHhMCdh3k7U

Correct solution is:

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

2 - In the Inspector, go to the Script component Image Target Behaviour and activate the property: Enable Extended Tracking

Best Luck!

like image 42
Sanket Prabhu Avatar answered Nov 22 '22 05:11

Sanket Prabhu