Aryzon and Vuforia Ground Plane Integration


#1

Hi everyone,
I’m trying to get the Vuforia Ground Plane Sample integrated with Aryzon in Unity.

So far I’ve taken the Aryzon Sample Scene and set up the Ground Plane according to the Vuforia Ground Plane Sample. I got rid of the Image Target and the Cube and basically exchanged them for the Ground Plane and a Capsule which should appear on click.

Right now I’m having a hard time triggering the onClick Event on the Ground Plane Stage via the Gazer. I hooked up the VRInteractiveItem and also the ExampleInteractiveItem Scripts to the Plane Finder trying to trigger the onClick Event somehow when gazing at the Ground Plane. No luck so far, though.

Does anyone have any advice on how to get this up and running?

Thanks for your help…
Mathias


#2

Hi Mathias, hope I can help you out! So as I understand correctly the Ground Plane Stage has a button component? Does it have a collider as well? Usually you would have an object with a VRInteractiveItem + ExpamleInteractiveItem (hooked up to the VRInteractiveItem) + a collider. It should then work.


#3

Hey Maarten, thanks for getting back…

What I’m basically trying to achieve is to gaze at the Ground Plane and position a 3D Object.
For that I created a Box Collider around the Ground Plane Stage with the intention to trigger Object positioning.

I also added the VRInteractiveItem and ExampleInteractiveItem Scripts to the Plane Finder.
I don’t really know if that’s the right way to go or if I necessarily need some type of Object to interact with, like the button you mentioned.

I added some screenshots to clarify what I’m actually doing and where I’m stuck…

Thanks, Mathias


#4


#5

Alright I understand now better what you are trying to achieve. We have done something similar for ARKit and ARCore, though I figure you can use it for Ground Plane as well this as well. Instead of using the reticle for this (you can though a bit more complex) I would suggest using a simple raycast on a collision layer:

private LayerMask collisionLayer = (1 << 10); //(This is ARKit’s plane layer)
Ray ray = planeHitCamera.ViewportPointToRay(new Vector3(0.5f, 0.5f, 0f)); //planeHitCamera should be the right eye camera in the Aryzon prefab to coincide with the reticle.
RaycastHit hit;

if (Physics.Raycast (ray, out hit, 5, collisionLayer)) {
objectContainerTransform.position = hit.point;
objectContainerTransform.rotation = hit.transform.rotation;
}