Nightmares – Character does not move, stopped in the Idle animation [closed]

Posted on

Question :

I’m following Nightmares step by step on Unity3D, but following the Nils tutorials I came across a problem, after finishing the script the character does not move on the test screen, he stands still in the Idle animation, and she does not continue, only loads 1 time. Thanks for the help, big hug!


        //Atribuir as referencias.
        anim = GetComponent <Animator> ();
        playerRigidbody = GetComponent <Rigidbody> ();


    void FixedUpadate()
        float h = Input.GetAxisRaw ("Horizontal");
        float v = Input.GetAxisRaw ("Vertical");


    //Movimenta o jogador
    void Move (float h, float v)
        // Determina o movimento

        //Normaliza o movimento 
        movement = movement.normalized * speed * Time.deltaTime;

        //Efetua o movimento no personagem
        playerRigidbody.MovePosition (transform.position + movement);

    //Gira o jogador
    void turning()
        Ray camRay = Camera.main.ScreenPointToRay (Input.mousePosition);
        RaycastHit floorHit;

        if (Physics.Raycast (camRay, out floorHit, camRayLenght, floorMask)) 
            Vector3 playerToMouse = floorHit.point - transform.position;
            playerToMouse.y = 0f;

            Quaternion newRotation = Quaternion.LookRotation(playerToMouse);


    void Animating(float h, float v)
        bool walking = (h!= 0f || v!= 0f);
        anim.SetBool("IsWalking", walking);




Answer :

The problem is in the code, see:

void FixedUpadate()

This is an internal Unity function, and should be spelled correctly.

void FixedUpdate()

Here’s how to use it:


Leave a Reply

Your email address will not be published. Required fields are marked *