O console da Unity está me dando esses dois erros: 1- Assets\Scripts\ControlaJogador.cs(30,40): error CS1061: 'Rigidbody' does not contain a definition for 'postion' and no accessible extension method 'postion' accepting a first argument of type 'Rigidbody' could be found (are you missing a using directive or an assembly reference?) 2-Assets\Scripts\ControlaJogador.cs(29,35): error CS1061: 'Rigidbody' does not contain a definition for 'movePosition' and no accessible extension method 'movePosition' accepting a first argument of type 'Rigidbody' could be found (are you missing a using directive or an assembly reference?)
Segue o código que eu transcrevi da aula:
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class ControlaJogador : MonoBehaviour
{
public float Velocidade = 10;
Vector3 direcao;
// Update is called once per frame
void Update() {
float eixoX = Input.GetAxis("Horizontal");
float eixoZ = Input.GetAxis("Vertical");
direcao = new Vector3(eixoX, 0, eixoZ);
if(direcao != Vector3.zero)
{
GetComponent<Animator>().SetBool("Movendo", true);
}
else
{
GetComponent<Animator>().SetBool("Movendo", false);
}
}
void FixedUpdate()
{
GetComponent<Rigidbody>().movePosition
(GetComponent<Rigidbody>().postion +
(direcao * Velocidade * Time.deltaTime));
}
}