using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class playerMovment : MonoBehaviour
{
public Rigidbody rb;
public float ForwardForce = 2000f;
// Start is called before the first frame update
void Start()
{
}
// Update is called once per frame
//Fixed use when we use force or gravity something like that
void FixedUpdate()
{
//To speed up
rb.AddForce(0, 0, ForwardForce * Time.deltaTime);
if (Input.GetKey(KeyCode.RightArrow)){
rb.AddForce(500 * Time.deltaTime, 0, 0);
// Debug.Log("right");
}
}
}