Ok , so my car can go up slopes, but whenever it goes up or down slopes , the camera shakes , which is really wierd. How can I stop this?
Second question, whenever the car goes down slopes , it slides . How can I stop both of these things from happening?(I think it’s the rigidbody on my car that is to blame)
Here’s my controller, just in case:
pragma strict
var Acceleration : float = 0.2;
function Update () {
if(Input.GetKey(KeyCode.W)) {//if the W key is pressed
transform.Translate(Vector3.forward * Acceleration);//the car moves to where the it's facing
Acceleration += 0.005;//accelerates. Frames are super fast so in proportion , this is good acceleration.
}
if(Input.GetKey(KeyCode.A)) {//if the A key is pressed
transform.rotation.eulerAngles.y -= 2;//rotates left.
}
if(Input.GetKey(KeyCode.D)) {//if the D key is pressed
transform.rotation.eulerAngles.y += 2;//rotates right.
}
}
Thanks!