Title Says The Problem, I’m Not Sure Where To Put Time.deltaTime either
void Start()
{
forceZ = 15;
}
void Update()
{
// Forward Movement
if (fallen == false) {
cameraFollow.position = ballTran.position;
}
ballRg.AddForce(forceX, forceY, forceZ);
// Forward Movement End
// Sideways Movement
if (Input.GetKeyDown("a")){
forceX = -10;
}
else if (Input.GetKeyUp("a") && !Input.GetKey("a") && !Input.GetKey("d")) {
forceX = 0;
}
if (Input.GetKeyDown("d")) {
forceX = 10;
}
else if (Input.GetKeyUp("d") && !Input.GetKey("d") && !Input.GetKey("a")) {
forceX = 0;
}
if (Input.GetKeyDown("a") && Input.GetKeyDown("d")) {
forceX = 0;
}
// Sideways Movement End
// Deaths
// Falling Death
if (ballTran.position.y <= -35) {
fallen = true;
}
}
}