void BroadcastCollisionExit(RagdollBone bone, Collision collision) { if (onCollisionExit != null) { onCollisionExit(bone, collision); } }
/* * send the message out that bone was collided * (given to ragdollbone component) */ void BroadcastCollisionEnter(RagdollBone bone, Collision collision) { if (onCollisionEnter != null) { onCollisionEnter(bone, collision); } }
void BroadcastCollisionStay(RagdollBone bone, Collision collision) { if (onCollisionStay != null) { onCollisionStay(bone, collision); } }
public RagdollTransform(Transform transform, bool isBoneParent, bool isBone, bool isRoot) { this.transform = transform; // originalRotation = transform.localRotation; // originalPosition = transform.localPosition; this.isBoneParent = isBoneParent; this.isRoot = isRoot; this.isBone = isBone; bone = transform.GetComponent <RagdollBone>(); rigidbody = transform.GetComponent <Rigidbody>(); if (rigidbody != null) { collisionDetectionModeBeforeKinematic = rigidbody.collisionDetectionMode; } collider = transform.GetComponent <Collider>(); if (!isRoot) { joint = transform.GetComponent <ConfigurableJoint>(); if (joint != null) { connectedBody = joint.connectedBody; } } }