Beispiel #1
0
 //位置检测
 public bool PositionDetect()
 {
     float[] UserAngles = MotionScript.CurrentAngle_All();
     for (int i = 0; i < 6; i++)
     {
         if (Mathf.Abs(UserAngles[i] - CorrectAngles[i]) > 2)
         {
             return(false);
         }
     }
     return(true);
 }
Beispiel #2
0
 void FixedUpdate()
 {
     if (GSKDATA.SoftCurrentMode != "Teach")
     {
         if (GSKDATA.OpenCollideFunc)
         {
             if (!GSKDATA.IsCollide && !GSKDATA.Scram)
             {
                 LastPos = robotmotion.CurrentAngle_All();
             }
         }
     }
 }
Beispiel #3
0
    private string getPointInfo()
    {
        RobotMotion Motionscript = GameObject.Find("MyMotion").GetComponent <RobotMotion>();

        float[] angle8 = Motionscript.CurrentAngle_All();
        string  point  = "(";

        for (int i = 0; i < 8; i++)
        {
            point += angle8[i].ToString();
            if (i != 7)
            {
                point += ",";
            }
        }
        point += ")";
        return(point);
    }