Solucionado (ver solução)
Solucionado
(ver solução)
1
resposta

PERSONAGEM ESTÁ DANDO ALGUNS PASSOS PRA FRENTE

PERSONAGEM ESTÁ DANDO ALGUNS PASSOS PRA FRENTE QUANDO EU PARO DE ANDAR

using System.Collections;
using System.Collections.Generic;
using System.Collections.Specialized;
using System.Threading;
using UnityEngine;

public class ControlaJogador : MonoBehaviour
{
    public float Velocidade = 10;

    // Update is called once per frame
    void Update()
    {

        float eixoX = Input.GetAxis("Horizontal");
        float eixoZ = Input.GetAxis("Vertical");

        Vector3 direcao = new Vector3(eixoX, 0, eixoZ);

        transform.Translate(direcao * Velocidade * Time.deltaTime);

        if (direcao != Vector3.zero)
        {
            GetComponent<Animator>().SetBool("Movendo", true);
        }
        else;
        {
           GetComponent<Animator>().SetBool("Movendo", false);
        }
    }
}

CÓDIGO DO "ControlaJogador".

1 resposta
solução!

RESOLVIDO.

Quer mergulhar em tecnologia e aprendizagem?

Receba a newsletter que o nosso CEO escreve pessoalmente, com insights do mercado de trabalho, ciência e desenvolvimento de software