Skip to content

walidabazo/Unity-2017.2-click-on-models-when-using-Vuforia-6.5

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 

Repository files navigation

Unity-2017.2-click-on-models-when-using-Vuforia-6.5

Unity 2017.2 click on models when using Vuforia 6.5

To show all videos and download all unity pagackes for free must be Subscriber youtube channel https://www.youtube.com/channel/UCNJVG9_IebHe-NF-K_Y8Grw?sub_confirmation=1

Watch the video

using System.Collections; using System.Collections.Generic; using UnityEngine; using Vuforia; using System.IO;

public class Clicks : MonoBehaviour {

public GameObject Button, Buttoncube, cube;
// Use this for initialization
void Start () {
    Button = GameObject.Find("Button");
    Buttoncube = GameObject.Find("Buttoncube");
    cube = GameObject.Find("Cube");

    Button.SetActive(true);
    Buttoncube.SetActive(false);
    cube.SetActive(false);
}

// Update is called once per frame
void Update () {

    if (Input.GetMouseButtonDown(0))
    {
        Ray ray = Camera.main.ScreenPointToRay(Input.mousePosition);
        RaycastHit hit;
        if (Physics.Raycast(ray, out hit))
        {
            if (hit.collider.tag == "Buttonone")
            {
                Button.SetActive(false);
                Buttoncube.SetActive(true);
                cube.SetActive(true);
            }

            if (hit.collider.tag == "Buttontow")
            {
                Button.SetActive(true);
                Buttoncube.SetActive(false);
                cube.SetActive(false);
            }
        }
    }
}

}

Can be start web Augmented reality

Https://Webxr.edafait.com

Good Company hosting and low price VPN

https://shorturl.edafait.com/?fZVHLor

YouTube Channel Wonder developer To Subscriber

https://youtube.com/channel/UCNJVG9_IebHe-NF-K_Y8Grw?sub_confirmation=1