// Use this for initialization
    void Start()
    {
        gestureRecog = gameObject.GetComponent <BaiduARGestureRecog> ();
        particle     = particleObj.transform.GetComponent <ParticleSystem> ();

        if (isStartHandTracking)
        {
            var main = particle.main;
            main.loop = true;

            //System.Type type = particle.main.GetType ();
            //PropertyInfo property = type.GetProperty ("loop");
            //property.SetValue (particle.main, true, null);
        }

        //手势识别
        gestureRecog.OnResultCallBack((bool result) => {
            if (!isStartHandTracking)
            {
                ShowObject(result);
            }
        });

        //实验室功能 手势跟踪
        gestureRecog.OnResultTrackCallBack((List <RecogGesture> lstRecg) => {
            ARDebug.Log("lstRecg.Count; " + lstRecg.Count);
            //recogList = lstRecg;
            if (isStartHandTracking)
            {
                MoveObject(lstRecg);
            }
        });
    }
Beispiel #2
0
    // Use this for initialization
    void Start()
    {
        gestureRecog = gameObject.GetComponent <BaiduARGestureRecog> ();
        particle     = particleObj.transform.GetComponent <ParticleSystem> ();

        if (isStartHandTracking)
        {
            var main = particle.main;
            main.loop = true;
        }

        //手势识别
        gestureRecog.OnResultCallBack((bool result) => {
            if (!isStartHandTracking)
            {
                ShowObject(result);
            }
        });

        //实验室功能 手势跟踪
        gestureRecog.OnResultTrackCallBack((List <RecogGesture> lstRecg) => {
            if (isStartHandTracking)
            {
                MoveObject(lstRecg);
            }
        });
    }