Search Unity

Check if in position

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

  1. Cynni

    Cynni

    Joined:
    Mar 19, 2015
    Posts:
    17
    Hi,



    I've been looking all over the internet and I couldn't find anything.

    I'm trying to make an AR board game with real cards using Vuforia. What I want is before the game starts the player has to put the deck of cards in a certain place. The player knows where to put it because of the border that is displayed on the screen. My question is, is there a way to check if an item is placed in a certain position/place.



    Thank you in advance

    Cynthia
     
    Last edited: Mar 13, 2018
  2. Vuforia-Strasza

    Vuforia-Strasza

    Official Vuforia Employee Vuforia

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

    My recommendation for accomplishing this with Vuforia would be to setup a Virtual Button Image Target as the designated location to place the deck of cards. What this will do is allow you to display to the user that the target is where you place the deck and once the deck is placed there, the deck occluding the target will trigger the Virtual Button and allow the game to start.

    Our core samples have an example scene that uses Virtual Button and you can read more about them here: https://library.vuforia.com/content...olution/How-To-Implement-Virtual-Buttons.html

    Thanks
     
    Cynni likes this.
  3. Cynni

    Cynni

    Joined:
    Mar 19, 2015
    Posts:
    17

    Thank you, it worked :)
    Another question, I wanted to use a ground plane to make the board for the game but my phone isn't listed in the supported devices list. I was wondering if there is another way to make it?

    I like to achieve a result like this (placing the cards on a surface and it will recognize which card is placed)


    I first made an image target with an image of a board but when placing cards its covered by the virtual board.
     
  4. Vuforia-Strasza

    Vuforia-Strasza

    Official Vuforia Employee Vuforia

    Joined:
    Jun 13, 2017
    Posts:
    548
    You should be able to create a larger Image Target and place multiple Virtual Buttons on it. Then you can use cards, which are also setup as Image Target, to place over the Virtual Buttons on the board. This should allow you to recreate similar behaviour to what is seen in the video you linked.
     
    Cynni likes this.
  5. Cynni

    Cynni

    Joined:
    Mar 19, 2015
    Posts:
    17
    Thank you!
    I have another question. Sorry for asking so much. I posted a second thread with another question, could you please check that out?
    https://forum.unity.com/threads/move-camera-to-create-a-shape.521988/#post-3425876
     
    Vuforia-Strasza likes this.