i was making a script and i couldn’t make the player fall so could someone edit the script so the player can fall
the script is :
using UnityEngine;
using System.Collections;
public class movearownd : MonoBehaviour {
public float movespeed = 10;
public float rotatespeed = 20;
public float gravityConstant = 3;
// Use this for initialization
void Start () {
}
// Update is called once per frame
void Update () {
float moveforward = movespeed * Time.smoothDeltaTime * Input.GetAxis("Vertical");
float rotateLeft = movespeed * Time.smoothDeltaTime * Input.GetAxis("Horizontal");
float rotate = rotatespeed * Time.smoothDeltaTime * Input.GetAxis("Horizontal");
float Gravity = gravityConstant * Time.smoothDeltaTime * Input.GetAxis("Horizontal");
transform.Translate(Vector3.forward * moveforward);
//transform.Translate(Vector3.left * moveLeft);
transform.Rotate(Vector3.up, rotate);
}
}