"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

How to use automatic hit test?

Hi, I'm trying to use the automatic hit test to place the Ground Plane Stage, but I'm the object is not appearing anywhere.

 

Below is the code I'm Trying to use:

 

public void OnInteractiveHitTest(HitTestResult result)
    {
            AnchorStage.transform.position = result.Position;
            AnchorStage.transform.rotation = result.Rotation;
            AnchorStage.SetActive(true);
    }

 

AnchorStage is the plane Stage.

Is there anything else I need to do to position it? 

 

Obs: Yeah, I know this srcipt will keep moving the object as I move the camera, There's more code on the function, I just downsized it to demonstrate, an yeah, I already tried to use the code like this.

Hi,

In the Core sample apps we demo this feature. Scene: 3-GroundPlane; PlaneManager.cs; Please feel free to go over our code and check how we implemented the feature.

Thank you.

Vuforia Engine Support