- Home /
Question by
UraniumSlug · Apr 06, 2013 at 03:38 PM ·
controlsflight
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?
Comment
Answer by SrBilyon · Apr 06, 2013 at 10:46 PM
Did you try damping it over time? Possibly with Time.deltaTime?
Example:
AddRelativeTorque(new Vector3(0,0,Input.GetAxis("Horizontal")*10*mass * Time.deltaTime));
Your answer
Follow this Question
Related Questions
Space Flight Help 0 Answers
Camera movement independent of player control 1 Answer
Flight control without torque/force 2 Answers
How to check rigid body vector movement? 0 Answers
My 2D character rig isn't moving when Animator comp. is on 1 Answer