I still don’t have an answer, and maybe I’m going way off the beaten path here but I haven’t found anything in the way of how to code this. My question is simple: What kind of knowledge do I need to understand how to control something with a rigidbody attached? I’ve googled things and all I’ve been getting are links to webpages about how to program a physics engine! Completely not what I am looking for!
To give you an example; I have an object which I am attempting to control in space on exactly one axis. I apply RelativeTorque to it to cause it to rotate, and when I let off the turn key it applies all of the momentum it gained while in rotation in the opposite direction. At that point the ship begins to “list” or rotate slowly on other axes as if it had collided with something. I get it, its due to my application of an proportional torque in an opposing direction but how would I correct for that?
Another thing, I could apply torque to rotate the ship like an aircraft, but while flying one must expect that once any significant change is made in desired direction of travel then the angular speed must change immediately.
If I’m rotating on X at a significant speed, and then change my direction of rotation to somewhere between X and Y then I find myself rotating even faster somewhere between these two axes but not exactly at the desired angle! I don’t even know how to begin compensating for that.
I knew there had to be something I was missing in my search for a solution. A PID seems to be what I was looking for. After further thought I have to wonder whether using real physics would work for my game (though it definitely needs it or some approximation of it for some reasons). After some google searching it became apparent that perhaps the game I’m basing mine on doesn’t use true physics. I’m wondering if it would still work.
I’m editing this. I think that instead of using Unity physics with Rigidbodies and PID controllers, I will stick with my current implementation. Its probably the better idea to do this because I’ve spent a lot of time on it and to go back to square one when things work fine would be stupid. I think I will take suggestion another person had. Instead of using physics, approximate velocities, etc. by computing them from the transform translations vs time and stuff.