public void DoFloat(float floatTime) { DisableAnimationSystem(); CharacterSettings.ActivateRagDoll(transform, false, false); Invoke("UndoFloat", floatTime); }
public void UndoFloat() { CharacterSettings.ActivateRagDoll(transform, true, true); // Set the character where the rigidbody is transform.position = Settings.RootTransform.position; Settings.RootTransform.localPosition = Vector3.zero; EnableAnimationSystem(); }
public virtual void DoRagDoll(Vector3 push) { DisableAnimationSystem(); // Start the ragdoll system CharacterSettings.ActivateRagDoll(transform, false, true); // Apply the push if (Settings.RootRigidBody != null) { Settings.RootRigidBody.AddForce(push); } }
public void UndoRagdoll() { CharacterSettings.ActivateRagDoll(transform, true, true); EnableAnimationSystem(); }