Ejemplo n.º 1
0
            private void TrembleAcceleration()
            {
                Vector3 upperArmAccel = FinchCore.GetNodeLinearAcceleration(node);
                float   acceleration  = (upperArmAccel - Vector3.up * g).sqrMagnitude;

                if (Mathf.Abs(acceleration - lastAcceleration) > accelerationBorder)
                {
                    if ((acceleration - lastAcceleration > 0) != directionUp)
                    {
                        directionUp = !directionUp;
                        TrembleCount++;
                    }

                    lastAcceleration = acceleration;
                }
            }
Ejemplo n.º 2
0
 /// <summary>
 /// Returns controller liner acceleration in meters per second squared.
 /// </summary>
 /// <param name="chirality">Controller chirality</param>
 /// <returns>Liner acceleration in meters per second squared</returns>
 public static Vector3 GetLinearAcceleration(FinchChirality chirality)
 {
     return(FinchCore.GetNodeLinearAcceleration((FinchNodeType)chirality));
 }
Ejemplo n.º 3
0
 /// <summary>
 /// Returns node liner acceleration in meters per second squared.
 /// </summary>
 /// <param name="node">Certain node</param>
 /// <returns>Liner acceleration in meters per second squared</returns>
 public static Vector3 GetNodeLinearAcceleration(FinchNodeType node)
 {
     return(FinchCore.GetNodeLinearAcceleration(node));
 }