I am fairly new to Unity and Vuforia Development. But as per basic knowledge I understand that Vuforia AR Ground Plane works like this.
1. We add the AR Camera and add the license 2. We add the ground plane stage and add a gameobject to it 3. We add the plane finder and attach the ground plane stage to it.
So with this we can add the multiple objects once the ground plane reticle appears. Now i want to change the object thats getting placed. So far this is my script where i add the chosen object as a child of the ground plane stage and then remove any unwanted children. But when i tap on screen only the cube is getting placed not the sphere. The object to be placed isnt getting updated.
public void AddCube(){ GameObject Stage = GameObject.FindGameObjectWithTag("Stage"); foreach (Transform child in Stage.transform) { GameObject.Destroy(child.gameObject); } GameObject Cube = Instantiate(CubePrefab) as GameObject; Cube.transform.parent = Stage.transform; Cube.active = true; } public void AddSpehere(){ GameObject Stage = GameObject.FindGameObjectWithTag("Stage"); foreach (Transform child in Stage.transform) { GameObject.Destroy(child.gameObject); } GameObject Sphere = Instantiate(SpherePrefab) as GameObject; Sphere.transform.parent = Stage.transform; Sphere.active = true; }
Hi,
Hi,
Please go over our Core sample app for Unity, available in the asset store.
In sample app we have a scene called GroundPlane in which we augment several objects based on touch input.
Hope this helps.
Thank you.
Vuforia Engine Support