public SimBiController(Character b) : base(b) { //if (b == null) //throwError("Cannot create a SIMBICON controller if there is no associated biped!!"); //characters controlled by a simbicon controller are assumed to have: 2 feet lLowerLeg = b.getARBByName("lLowerLeg"); rLowerLeg = b.getARBByName("rLowerLeg"); lUpperLeg = b.getARBByName("lUpperLeg"); rUpperLeg = b.getARBByName("rUpperLeg"); lFoot = lLowerLeg; rFoot = rLowerLeg; lHand = b.getARBByName("lLowerArm"); rHand = b.getARBByName("rLowerArm"); //and two hips connected to the root //Joint lHip = b.getJointByName("lHip"); //Joint rHip = b.getJointByName("rHip"); lHipIndex = b.getJointIndex("lHip"); rHipIndex = b.getJointIndex("rHip"); root = b.getRoot(); torso = b.getARBByName("torso"); head = b.getARBByName("head"); statesData = null; comVelocity = new Vector3(); comPosition = new Vector3(); d = new Vector3(); v = new Vector3(); doubleStanceCOMError = new Vector3(); comOffsetSagittal = 0; comOffsetCoronal = 0; qRootD = Quaternion.identity; isFreeHeading = true; isAddFootJoint = false; setStance(SimGlobals.LEFT_STANCE); phi = 0; setFSMStateTo(-1); prevFSMState = -1; nextFSMState = -1; isLeftReverseStance = true; bodyTouchedTheGround = false; lFootTouchedTheGround = false; rFootTouchedTheGround = false; twoFootTouchedGround = false; startingState = 1; startingStance = SimGlobals.LEFT_STANCE; }
public void setStatesData(SimBiData data) { statesData = data; }