Search Unity

Tap to position the object once

Discussion in 'Vuforia' started by Cynni, Mar 29, 2018.

  1. Cynni

    Cynni

    Joined:
    Mar 19, 2015
    Posts:
    17
    Hi,

    I'm trying to get an object placed on a ground plan once. I already added the DeployStageOnce script from Vuforia, but I have problems getting the object placed in front of the camera. Also, I want the object being placed only once and when it's placed it can't be moved anymore.

    I want something like this
    https://imgur.com/jGJQkyk

    --Cynthia
     
  2. Vuforia-Strasza

    Vuforia-Strasza

    Official Vuforia Employee Vuforia

    Joined:
    Jun 13, 2017
    Posts:
    548
    Hello Cynthia,

    Our Ground Plane sample for Vuforia 7.1 with Unity 2018.1 contains an example of doing this. This version is currently in beta, but should be commercial soon.
     
    Cynni likes this.
  3. Cynni

    Cynni

    Joined:
    Mar 19, 2015
    Posts:
    17

    I downloaded the beta version, where can I find this example?
    I added the Ground Plane and the Plane Finder and unchecked 'duplicate stage'. I build & run, for testing I used a cube, when tapping the screen the cube is placed, but doesn't stay in place when I move around. Is this because of the beta version.
     
  4. Vuforia-Strasza

    Vuforia-Strasza

    Official Vuforia Employee Vuforia

    Joined:
    Jun 13, 2017
    Posts:
    548
  5. MominaRazzaq

    MominaRazzaq

    Joined:
    Apr 23, 2018
    Posts:
    1
    I am on Unity 2018.1 and I am beginner to AR. In Unity 2018.1, is there any need to write OnInteractiveHitTest() function?
    Help me Please!!!!
     
  6. Cynni

    Cynni

    Joined:
    Mar 19, 2015
    Posts:
    17
    I'm not the best programmer either, but I stopped using Vuforia because I didn't want to use targets. But you can use ARCore and there is already a script that checks if you tapped the screen for placing the object.
     
  7. VenkyTrillu

    VenkyTrillu

    Joined:
    Mar 3, 2018
    Posts:
    1
    Add this Script to PlaneFinder and , call the Script DeploymentStageOnce-->OnInteractiveHitTest Method in event Section . Like Down below..
     

    Attached Files: