Log in or register to post comments

How to use automatic hit test?

September 23, 2019 - 3:54pm #1

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.

How to use automatic hit test?

September 24, 2019 - 6:05am #2

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

Log in or register to post comments