Beispiel #1
0
    public void DoFloat(float floatTime)
    {
        DisableAnimationSystem();

        CharacterSettings.ActivateRagDoll(transform, false, false);
        Invoke("UndoFloat", floatTime);
    }
Beispiel #2
0
    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();
    }
Beispiel #3
0
    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);
        }
    }
Beispiel #4
0
 public void UndoRagdoll()
 {
     CharacterSettings.ActivateRagDoll(transform, true, true);
     EnableAnimationSystem();
 }