using System.Collections;
using UnityEngine;
public class playercontroller : MonoBehaviour {
private rigidbody rb;
void Start()
{
rb = GetComponent();
}
void FixedUpdate ()
{
float moveHorizontal = Input.Getaxis ("horizontal")
float moveVertical = Input.Getaxis ("Vertical")
Vector3 movment = new Vector3 (MoveHorizontal, 0.0f , MoveVertical);
rb.Addforce (movment);
}
}
↧