DisableClamping() public method

public DisableClamping ( ) : void
return void
Exemplo n.º 1
0
    void Jump_EnterState()
    {
        controller.DisableClamping();
        controller.DisableSlopeLimit();

        moveDirection += controller.up * CalculateJumpSpeed(JumpHeight, Gravity);
    }
 void Jump_EnterState()
 {
     controller.DisableClamping();
     controller.DisableSlopeLimit();
     //cameraObject.SendMessage("setCameraPositionJumpView");
     anim.SetBool("Jump", true);
     moveDirection += controller.up * CalculateJumpSpeed(JumpHeight, Gravity);
 }
Exemplo n.º 3
0
 public void AddVelocity()
 {
     controller.DisableClamping();
     controller.DisableSlopeLimit();
     moveDirection = (controller.up * CalculateJumpSpeed(JumpHeight, Gravity));
     //currentState = PlayerStates.Fall;
     return;
 }
Exemplo n.º 4
0
 private void Jump_EnterState()
 {
     superCharacterController.DisableClamping();
     superCharacterController.DisableSlopeLimit();
     currentVelocity += superCharacterController.up * CalculateJumpSpeed(jumpHeight, gravity);
     canJump          = false;
     CmdJump();
 }
Exemplo n.º 5
0
    void Jump_EnterState()
    {
        controller.DisableClamping();
        controller.DisableSlopeLimit();

        this.Animator.SetBool("Jump", true);
        this.StartCoroutine(DisableBool("Jump", 0.1f));
    }
Exemplo n.º 6
0
 void Jump_EnterState()
 {
     superCharacterController.DisableClamping();
     superCharacterController.DisableSlopeLimit();
     currentVelocity += superCharacterController.up * CalculateJumpSpeed(jumpHeight, gravity);
     canJump          = false;
     animator.SetInteger("Jumping", 1);
     animator.SetTrigger("JumpTrigger");
 }
Exemplo n.º 7
0
        private void Jump_EnterState()
        {
            superCharacterController.DisableClamping();
            superCharacterController.DisableSlopeLimit();

            currentVelocity = new Vector3(currentVelocity.x, jumpSpeed, currentVelocity.z);

            animator.SetInteger("Jumping", 1);
            rpgCharacterController.SetAnimatorTrigger(AnimatorTrigger.JumpTrigger);
            canJump = false;
        }
    void Jump_EnterState()
    {
        controller.DisableClamping();
        controller.DisableSlopeLimit();

        if (IsDashing() || input.Current.DashInput)
        {
            isDashJump = true;
        }

        moveDirection.y = 0;
        moveDirection  += controller.up * CalculateJumpSpeed(JumpHeight, Gravity);
    }
 private void Jump_EnterState()
 {
     superCharacterController.DisableClamping();
     superCharacterController.DisableSlopeLimit();
     currentVelocity += superCharacterController.up * CalculateJumpSpeed(jumpHeight, gravity);
     //Set weaponstate to Unarmed if Relaxed.
     if (rpgCharacterController.weapon == Weapon.RELAX)
     {
         rpgCharacterController.weapon = Weapon.UNARMED;
         animator.SetInteger("Weapon", 0);
     }
     canJump = false;
     animator.SetInteger("Jumping", 1);
     animator.SetTrigger("JumpTrigger");
 }
Exemplo n.º 10
0
        private void Jump_EnterState()
        {
            superCharacterController.DisableClamping();
            superCharacterController.DisableSlopeLimit();

            if ((RPGCharacterState)lastState == RPGCharacterState.Swim)
            {
                currentVelocity = new Vector3(currentVelocity.x, strokeSpeed, currentVelocity.z);
            }
            else
            {
                currentVelocity = new Vector3(currentVelocity.x, jumpSpeed, currentVelocity.z);
            }
            animator.SetInteger("Jumping", 1);
            rpgCharacterController.SetAnimatorTrigger(AnimatorTrigger.JumpTrigger);
            canJump = false;
        }
    /*void Update () {
     * Update is normally run once on every frame update. We won't be using it
     * in this case, since the SuperCharacterController component sends a callback Update
     * called SuperUpdate. SuperUpdate is recieved by the SuperStateMachine, and then fires
     * further callbacks depending on the state
     * }*/

    // Below are state functions. Each one is called based on the name of the state,
    // so when currentState = Idle, we call Idle_EnterState. If currentState = Jump, we call
    // Jump_SuperUpdate()

    void Idle_EnterState()
    {
        timeInCurrentState = 0;
        controller.EnableSlopeLimit();
        controller.DisableClamping();
    }