public void ChangeCommandType(JointCommandObject.CommandTypes type)
 {
     cmdType = type;
     if (cmdType == JointCommandObject.CommandTypes.Position)
     {
         joint.useMotor  = false;
         joint.useSpring = true;
     }
     else if (cmdType == JointCommandObject.CommandTypes.Velocity)
     {
         joint.useMotor  = true;
         joint.useSpring = false;
     }
 }
 public void OnToggleJointCmdMode(bool value)
 {
     if (value)
     {
         cmdType   = JointCommandObject.CommandTypes.Velocity;
         unit.text = "Deg/s";
         inputFieldTime.interactable = true;
         sliderJointAngle.minValue   = -360.0f;
     }
     else
     {
         cmdType   = JointCommandObject.CommandTypes.Position;
         unit.text = "Degree";
         inputFieldTime.interactable = false;
         sliderJointAngle.minValue   = 0.0f;
     }
 }
 // Use this for initialization
 void Start()
 {
     cmdType = JointCommandObject.CommandTypes.Position;
 }