//if this is a vehicle and it was colliding with any Vehicle or NPC, resume moving now void OnCollisionExit(Collision pCollision) { // if (transform.CompareTag ("Vehicle")) // { if (pCollision.transform.CompareTag("internal_collider") || pCollision.transform.CompareTag("NPC")) { PopulationEngine.NPCMotor motor = transform.parent.parent.GetComponent <PopulationEngine.NPCMotor>(); RunOver runOver = transform.parent.parent.GetComponent <RunOver>(); if (motor) { motor.Walking(); } else { if (runOver) { runOver.Resume(); } } } // } }
public void TurnOnRagdoll(bool pRagdollMode, Vector3 pCollisionOrigin) { fallDown = pRagdollMode; if (pRagdollMode) { // if (!mFlyAway) // { mCollisionOrigin = pCollisionOrigin; mMotor.Waiting(); mFlyAwayTimer = 0; mFlyAway = true; mRDHelper.ragdolled = true; // } } else { mRDHelper.ragdolled = pRagdollMode; mMotor.Walking(); } }