Search Unity

Vuforia 7 Plane - Custom Interactive Hit Test

Discussion in 'Vuforia' started by Gamrek, Dec 21, 2017.

  1. Gamrek

    Gamrek

    Joined:
    Sep 28, 2010
    Posts:
    164
    Hello,

    I just downloaded Unity 2017.3 and trying out with the GroundPlane example from Vuforia. I understand most of it. But I just wonder how to make custom interactive hit test, the example provides an solution for detection hit result on where user's finger input. What if I want to make it return hit test result from the center of the screen? Like shooting a bullet from the center? Is it just a simple physics raycast?

    thanks in advance.

    Derek
     
  2. nilsk123

    nilsk123

    Joined:
    Dec 13, 2016
    Posts:
    19
    Just fire a raycast from center of screen in the direction the camera faces, then check for the intersect point and thats your anchor.
     
  3. Gamrek

    Gamrek

    Joined:
    Sep 28, 2010
    Posts:
    164
    Thanks for your reply, do you know what layer does it has? I might need to raycast it with a specific layer.
     
  4. nilsk123

    nilsk123

    Joined:
    Dec 13, 2016
    Posts:
    19
    Default layer, called Ground Plane Stage, just set your own layer or tag to make it easier.
     
  5. Gamrek

    Gamrek

    Joined:
    Sep 28, 2010
    Posts:
    164
    Thanks! this clears things out for me.
     
  6. planetmatrix

    planetmatrix

    Joined:
    Dec 8, 2015
    Posts:
    38
    Hi Gamrek (Derek)

    How did you manage to get Vuforia 7 to work and on what device? I too tried https://library.vuforia.com/articles/Solution/ground-plane-guide.html.
    But the samples didn't worked, It could be I have an Note 8 (Exynos) and Pixel 2 XL, both of which are not listed in the supported Device List.
     
  7. Gamrek

    Gamrek

    Joined:
    Sep 28, 2010
    Posts:
    164
  8. Kubic75

    Kubic75

    Joined:
    Jan 2, 2017
    Posts:
    83
    I also just installed Unity 2017.3 and Vuforia Groundplane, but on my Galaxy S7 no ground is detected.
    Is Unity 2017.3 Patch 1 really needed?
    It´s not available in the downloads...

    PS: Also on an S8 no ground detected
    PPS: Vuforia Ducumentation:
    NOTE: The initial release of Vuforia Ground Plane in Unity 2017.3 (Vuforia v7.0.36) supports ARKit enabled iOS devices. Android devices and non-ARKIt enabled iOS devices are supported in Unity 2017.3 Patch 1 (Vuforia 7.0.40). See Supported Device List for the latest device coverage. New devices are added frequently.
     
    Last edited: Dec 21, 2017
  9. planetmatrix

    planetmatrix

    Joined:
    Dec 8, 2015
    Posts:
    38
  10. Gamrek

    Gamrek

    Joined:
    Sep 28, 2010
    Posts:
    164
    Does anyone know that if enable groundplane on current version will mean using ARKit on the device by default? Also how do I enable ambient light estimation?
     
  11. planetmatrix

    planetmatrix

    Joined:
    Dec 8, 2015
    Posts:
    38
  12. OsamaBigWolf

    OsamaBigWolf

    Joined:
    Jul 24, 2017
    Posts:
    9
    how can i run it on editor ? I am using unity 2017.3.0p1 vuforiaV7.0.36 .It is not working when i use my webcam ?.how can i test it ?
     
  13. lcd11001

    lcd11001

    Joined:
    Sep 27, 2017
    Posts:
    5

    Attached Files:

  14. tomicz

    tomicz

    Joined:
    Mar 16, 2015
    Posts:
    152
    You add a collider and a rigidbody to the object you want to interact with. Then you make a script with OnMouseDown method and inside you add functionality, like turning on/off lights.