Dampen Flight Controls

I’m currently attempting to code flight controls for a space simulator. I’ve gotten them to be responsive, but at the moment they are a bit erratic. Gravity is 0 and the mass of the ship is 1000.

AddRelativeTorque(new Vector3(0,0,Input.GetAxis("Horizontal")*10*mass));
AddRelativeTorque(new Vector3(0,Input.GetAxis("Horizontal")*5*mass,0));
AddRelativeTorque(new Vector3(Input.GetAxis("Vertical")*10*mass,0,0));

What other variables or factors should I take into account?

1 Answer

1

Did you try damping it over time? Possibly with Time.deltaTime?

Example:

AddRelativeTorque(new Vector3(0,0,Input.GetAxis("Horizontal")*10*mass * Time.deltaTime));