Ejemplo: movimiento unitario wasd
using UnityEngine;
public class Example : MonoBehaviour
{
public int speed;
// Update is called once per frame
void FixedUpdate()
{
Vector3 Movement = new Vector3(Input.GetAxis("Horizontal"), 0, Input.GetAxis("Vertical"));
this.transform.position += Movement * speed * Time.deltaTime;
}
}
¡Haz clic para puntuar esta entrada!
(Votos: 0 Promedio: 0)