Log in or register to post comments

Poses in ImageTargets example

May 17, 2018 - 8:44am #1


I am running the ImageTargets sample code and added a script in Unity to output what is the pose of the ARCamera and the Astronaut. What I get is that the marker pose is set as (0,0,0) at all times and that the camera pose is only defined once the marker is found and the camera pose is defined according to the marker, i.e. if the marker moves the camera pose moves accordingly.

I would like that the first marker tracked in the scene would not define the world origin, but instead that the ARCamera pose is given according to the initial position that the device starts (as ARKit) or according to a specific marker, and in the same way, the detected marker pose is given according to the ARCamera. I think I have missed the documentation where this is explained. Can someone point me to it?

I believe that ARKit is also not being enabled in the ImageTargets sample code? How can I enable it?

My goal is to get information of the pose of the phone/camera and the pose of the tracked marker in the world coordinates.

Running Unity 2018.1.0f2 and building for iPhone 8

Poses in ImageTargets example

May 17, 2018 - 11:50pm #3

Thanks for the really quick reply and I got it to work by changing the settings in the ARCamera and the Vuforia Configuration! Keep forgetting that you have enabled quite a lot of configurations in Unity :) Is there any place I can find documentation describing all the configuration fields and what is the difference between for example choosing "camera" versus "device tracking", etc.? I tried to look in the developer page but couldn't find it but I probably missed it.



Poses in ImageTargets example

May 17, 2018 - 1:58pm #2

Hello araujokth,

The world center mode defaults to first target. What you're looking for is having the camera be the world center. This can be modified on the ARCamera or via the APIs.

The Vuforia Config has an option for enabling the Positional Device Tracker (also available via APIs). This field will automatically activate when you begin to use a feature that utilized the PDT/ARKit, but otherwise remains off. You can force it one using this field in the Vuforia Config.


Vuforia Support

Log in or register to post comments