1
resposta

Zumbis não se mexem, e não tenho erros no console

ao dar start no unity meus zumbis não vão atras do meu player, ficam no mesmo lugar segue código

using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class ControlaInimigo : MonoBehaviour{

    public GameObject Jogador;

    public float Velocidade = 5;


    // Start is called before the first frame update
    void Start()
    {

    }

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

    }

     void FixedUpadate()
    {
     Vector3 direcao = Jogador.transform.position - transform.position;
         GetComponent<Rigidbody> ().MovePosition
            (GetComponent<Rigidbody>().position + 
                 direcao.normalized * Velocidade * Time.deltaTime);
    }

}

segue imagem da tela do Unity

https://uploaddeimagens.com.br/imagens/problema_unity-png-349b9a53-ee37-479a-b90b-5d0764c71288

1 resposta

Oi, Vagner, tudo bem?

Você preencheu a variável Jogador no Inspector?

Se sim, tem como fazer um .zip do projeto e colar o link aqui? Pode ser via Dropbox, Google Drive, etc.

Aí damos uma olhada mais a fundo.

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