im trying to reset my car position by pressing Q to avoid the vehicle to be stuck rollover, but when i press Q, there is no cooldown and if i keep pressing the car will go up flying. I dont want that, hopefully someone can help me :> I also wanted to change only the X and Z rotation with the same keycode but im having problems to make it work.
This is the code that i have currently
if (inVehicle == true && Input.GetKey(KeyCode.Q))
{
Vector3 car = transform.position;
car.y += 1;
transform.position = car;
Quaternion rotation = Quaternion.Euler(0, 0, 0);
}