"We offer new support options and therefor the forums are now in read-only mode! Please check out our Support Center for more information." - Vuforia Engine Team

AR/VR Sample - Moving the reticle

I am working on a project that is based on the AR/VR sample, so a lot of the scripts are the same as in the sample.

I want to move the reticle to the upper left corner of the camera, not to have it as it is now, right in the middle of the camera.

The reticle can be repositioned in the script Reticle.cs, and the Gazeray can be moved in GazeRay.cs. I first moved the Reticle to (-1, 0.6, 0) and the GazeRay to (-2.41, 1.4, 0) which is approximately the same position when used with the PC's webcam. But when I build to Android it does not work so good. 

1. Why can't I use the same vector for the positions of the Reticle and the GazeRay? Am I missing something?

2. Can it be done in a better way? When they are in the middle of the camera it works so good to activate triggers, when moved it doesn't work good at all.

I would highly appriciate all help, have been stuck on this issue for a while now :(

bmxIIcool

Tue, 03/14/2017 - 15:22

Managed to find one solution :D

In Reticle.cs, change;
this.transform.localPosition = Vector3.forward * bgDepth;
to;
this.transform.localPosition = new Vector3("wanted x-pos", "wanted y-pos", 1) * bgDepth;