private Vector3 mydir;
void Update()
{
inputH=Input.GetAxis("Horizontal");
inputV=Input.GetAxis("Vertical");
mydir=new Vector3(inputH,0,inputV)
}
private void FixedUpdate(){
if(inputV!=0){
rigid.MovePosition(transform.position+transform.forward*moveSpeed*Time.deltaTime*inputH)
}else{
if(inputH!=0){
rigid.MovePosition(transform.position+transform.right*moveSpeed*Time.deltaTime)
}
}
}