Alright, So I am trying to design a racing type of game, and I have this snippit of code:
if (Input.GetKey(KeyCode.W) || Input.GetKey(KeyCode.UpArrow))
{//if "W" or "UpArrow" is pressed
currentSpeed += Speed; //increase the speed
SlowingDownSpeed = 0; //disable slowing down
if(currentSpeed <= 0)
{//if the speed is in reverse / in park
currentSpeed*= -1; //make it positive
}
}
If the car is facing up in air, like this (sorry for bad handwriting):
Then If I hold Up Arrow or “W” it goes higher in the air.
The reason I don’t think it is normal is if the car is upside down, like this:
It still would move forward, I don’t know if there is a way to fix this, so any help would be appreciated, thanks!