void Start() { Debug.LogWarning("PropRoot and Prop system is deprecated. Please see the 'Prop' demo to learn about the new easier and much more performance-efficient PropMuscle and PuppetMasterProp system.", transform); if (transform.position != muscle.transform.position) { Debug.LogError("Prop target position must match exactly with its muscle's position!", transform); } xMotion = muscle.xMotion; yMotion = muscle.yMotion; zMotion = muscle.zMotion; angularXMotion = muscle.angularXMotion; angularYMotion = muscle.angularYMotion; angularZMotion = muscle.angularZMotion; colliders = muscle.GetComponentsInChildren <Collider>(); if (!isPickedUp) { ReleaseJoint(); } OnStart(); initiated = true; }
bool AreThereJointlessGaps() { foreach (ConfigurableJoint joint in rootBone.GetComponentsInChildren <ConfigurableJoint>()) { bool parentHasJoint = joint.transform.parent.GetComponent <ConfigurableJoint>(); if (!parentHasJoint && joint != rootBone) { return(true); } } return(false); }
protected virtual void Awake() { if (transform.position != muscle.transform.position) { Debug.LogError("Prop target position must match exactly with it's muscle's position!", transform); } xMotion = muscle.xMotion; yMotion = muscle.yMotion; zMotion = muscle.zMotion; angularXMotion = muscle.angularXMotion; angularYMotion = muscle.angularYMotion; angularZMotion = muscle.angularZMotion; colliders = muscle.GetComponentsInChildren <Collider>(); }
void Start() { if (transform.position != muscle.transform.position) { Debug.LogError("Prop target position must match exactly with it's muscle's position!", transform); } xMotion = muscle.xMotion; yMotion = muscle.yMotion; zMotion = muscle.zMotion; angularXMotion = muscle.angularXMotion; angularYMotion = muscle.angularYMotion; angularZMotion = muscle.angularZMotion; colliders = muscle.GetComponentsInChildren <Collider>(); if (!isPickedUp) { ReleaseJoint(); } OnStart(); }