Beispiel #1
0
    // Use this for initialization
    void Start()
    {
        baseNB       = transform.Find("RobotBase").GetComponent <NewtonBody>();
        baseActuator = transform.Find("RobotBase").GetComponent <NewtonHingeActuator>();

        bodyNB       = transform.Find("RobotBody").GetComponent <NewtonBody>();
        bodyActuator = transform.Find("RobotBody").GetComponent <NewtonHingeActuator>();

        armNB       = transform.Find("RobotArm").GetComponent <NewtonBody>();
        armActuator = transform.Find("RobotArm").GetComponent <NewtonHingeActuator>();

        handANB       = transform.Find("RobotHandA").GetComponent <NewtonBody>();
        handAActuator = transform.Find("RobotHandA").GetComponent <NewtonSliderActuator>();

        handBNB       = transform.Find("RobotHandB").GetComponent <NewtonBody>();
        handBActuator = transform.Find("RobotHandB").GetComponent <NewtonSliderActuator>();
    }
 // Use this for initialization
 void Start()
 {
     na             = GetComponent <NewtonHingeActuator>();
     na.TargetAngle = 2000.0f;
 }