Exemple #1
0
        public void Submit(string key, PositionType position, List <DotPoint> points, int durationMillis)
        {
            byte[] bytes = new byte[20];
            for (var i = 0; i < points.Count; i++)
            {
                DotPoint point = points[i];
                bytes[point.Index] = (byte)point.Intensity;
            }

            HapticApi.SubmitByteArray(key, position, bytes, 20, durationMillis);
        }
Exemple #2
0
 // Update is called once per frame
 void Update()
 {
     if (Input.GetKeyDown(KeyCode.Space))
     {
         Debug.Log("test");
         byte[] bytes = new byte[20];
         bytes[0] = 10;
         bytes[1] = 10;
         bytes[2] = 10;
         bytes[3] = 10;
         HapticApi.SubmitByteArray("test", PositionType.ForearmL, bytes, 20, 100);
         HapticApi.SubmitByteArray("test2", PositionType.VestFront, bytes, 20, 100);
     }
 }
 public void Submit(string key, PositionType position, byte[] motorBytes, int durationMillis)
 {
     HapticApi.SubmitByteArray(key, position, motorBytes, motorBytes.Length, durationMillis);
 }