using UnityEngine;
public class PlayerController : MonoBehaviour
{
private Rigidbody rigidbody;
private void Start()
{
Cursor.visible = false;
rigidbody = gameObject.GetComponent<Rigidbody>();
}
private void Update()
{
if (Input.GetKey(KeyCode.W))
{
rigidbody.AddForce(Vector3.forward * 10f);
}
}
}