So I am trying to program a game like rocket league but with like 5-10 sports and need to be able to rotate my car while it’s in the air. How would I program it to flip and turn with keyboard controls once a button has been pressed (while it’s in air)
The code below applies a torque force when the a key is pressed
Var torque : int = 10;
if(Input.GetKey(KeyCode.A)){
GetComponent.().AddRelativeTorque(Vector3.left * torque, ForceMode.Acceleration);
}
In C# would it just be public torque = 10;
blah blah blah blah.
HOLY SHIT THANKS MATE
Haha no prob. Good luck!