Вот что скажите?
0
using System.Collections;
using System.Collections.Generic;
using EnityEngine;
public class Player : MonoBehaviour
{
[SerializeField] Keycode keyOne;
[SerializeField] Keycode keyTwo;
[SerializeField] Vector3 moveDirection;
private void FixedUpdate()
{
if (Input.Getkey(keyOne))
{
GetComponent<Rigidbody>().velocity += moveDirection;
}
if (Input.GetKey(keyTwo))
{
GetComponent<Rigidbody>().velocity -= moveDirection;
}
}
}