void FixedUpdate() { if (!GetComponent <Rigidbody>().isKinematic) { drive.Update(); } }
void FixedUpdate() { if (GetComponent <HingeJoint>().connectedBody.GetComponent <Rigidbody>().isKinematic) { float angle0delta = Mathf.Sign(kinematicrestdeltaangle0) * Time.deltaTime * rotatingplatformkinematicangularvelocity; float angle1delta = Mathf.Sign(kinematicrestdeltaangle1) * Time.deltaTime * leverkinematicangularvelocity; float angle2delta = Mathf.Sign(kinematicrestdeltaangle2) * Time.deltaTime * armkinematicangularvelocity; angle0delta = Mathf.Sign(kinematicrestdeltaangle0) == Mathf.Sign(kinematicrestdeltaangle0 - angle0delta) ? angle0delta : kinematicrestdeltaangle0; angle1delta = Mathf.Sign(kinematicrestdeltaangle1) == Mathf.Sign(kinematicrestdeltaangle1 - angle1delta) ? angle1delta : kinematicrestdeltaangle1; angle2delta = Mathf.Sign(kinematicrestdeltaangle2) == Mathf.Sign(kinematicrestdeltaangle2 - angle2delta) ? angle2delta : kinematicrestdeltaangle2; kinematicrestdeltaangle0 -= angle0delta; kinematicrestdeltaangle1 -= angle1delta; kinematicrestdeltaangle2 -= angle2delta; Kinematic(angle0delta, angle1delta, angle2delta); } else { drive.Update(); } capture.KinematicUpdate(); for (int i = 0; i < fingers.Count; i++) { fingers[i].KinematicUpdate(); } if (thing != null) { thing.KinematicUpdate(); } }
void FixedUpdate() { if (GetComponent <HingeJoint>().connectedBody.GetComponent <Rigidbody>().isKinematic) { float angle0delta = Mathf.Sign(kinematicrestdeltaangle0) * Time.deltaTime * kinematicangularvelocity; float angle1delta = Mathf.Sign(kinematicrestdeltaangle1) * Time.deltaTime * kinematicangularvelocity; float angle2delta = Mathf.Sign(kinematicrestdeltaangle2) * Time.deltaTime * kinematicangularvelocity; angle0delta = Mathf.Sign(kinematicrestdeltaangle0) == Mathf.Sign(kinematicrestdeltaangle0 - angle0delta) ? angle0delta : kinematicrestdeltaangle0; angle1delta = Mathf.Sign(kinematicrestdeltaangle1) == Mathf.Sign(kinematicrestdeltaangle1 - angle1delta) ? angle1delta : kinematicrestdeltaangle1; angle2delta = Mathf.Sign(kinematicrestdeltaangle2) == Mathf.Sign(kinematicrestdeltaangle2 - angle2delta) ? angle2delta : kinematicrestdeltaangle2; kinematicrestdeltaangle0 -= angle0delta; kinematicrestdeltaangle1 -= angle1delta; kinematicrestdeltaangle2 -= angle2delta; Kinematic(angle0delta, angle1delta, angle2delta); } else { drive.Update(); } }
void FixedUpdate() { drive.Update(); }