Exemple #1
0
 void Awake()
 {
     if (I == null)
     {
         I = this;
     }
 }
Exemple #2
0
    // Use this for initialization
    void Start()
    {
        // We query the handcontroller script to determine which touch controller we should use
        ht = gameObject.GetComponent <HandTracking> ();
        if (ht == null)
        {
            Debug.LogError("No HandTracking component found");
        }

        rball  = ball.GetComponent <Renderer> ();
        kball  = ball.GetComponent <Kinetics> ();
        rglove = gameObject.GetComponent <Renderer> ();
    }
Exemple #3
0
    //public Dictionary<string, List<Point>> palmBase = new Dictionary<string, List<Point>>();
    protected override void OnMessage(MessageEventArgs e)
    {
        //!Retrieving data from the websocket
        // Debug.Log(e.Data);
        // Send ("");
        // var json = JSON.Parse(e.Data);
        Debug.Log("hey");
        string s    = File.ReadAllText(@"C:\Users\adriel.oliveira\Desktop\home\handTracking\Assets\data.json");
        var    json = JSON.Parse(s);

        // if (handStructure.Count > 0) handStructure.Clear();
        Debug.Log("Inicio");
        Debug.Log($"{json.Count} function");

        HandTracking.StartHandTracking(json);
    }
Exemple #4
0
 void Update()
 {
     // GestureWatcher.SetGesture(HandManager.hand1, ExtensionMethods.ParseEnum<Gesture>(json["bboxes"][frame]["hand1"]["gesture"]), () => { });
     // GestureWatcher.SetGesture(HandManager.hand2, ExtensionMethods.ParseEnum<Gesture>(json["bboxes"][frame]["hand2"]["gesture"]), () => { });
     if (frame <= 803)
     {
         HandTracking.StartHandTracking(json);
         frame++;
         HandTracking.SetFrame(frame);
     }
     else
     {
         HandTracking.ResetFrame();
         frame = 0;
     }
 }
Exemple #5
0
 void Start()
 {
     htGlove  = glove.GetComponent <HandTracking> ();
     htRacket = racket.GetComponent <HandTracking> ();
 }