I don't know enough about PhysX (or actual physics!) so was wondering if someone could help me out.
I'm trying to create some simple spaceship controls on a rigidBody. I am doing this by using AddForce to add a direction vector and move the ship accordingly. The problem is (rather obviously), once I have added the force, it stays in effect endlessly. I obviously need to add some kind of resistance to the ship so that after I move in a direction, it slowly comes to a stop (which is specified by the resistance variable or whatever.)
Firstly, is using AddForce the wrong thing to do? Secondly, can anyone suggest a method in which I could apply resistance to my equation:
asked Nov 04 '10 at 02:05 PM
Every force has an equally strong reaction. Action is reaction.
If you hit something from left to right, you can hit it from right to left aswell using a timer or anything else depending on your desired result.
If you are in space and hit something, you will not see the real reactions in games. So just cheat and make a % of the force added to be added on opposite over a time period.
Velocity -= (Decelleration + Time.deltaTime);
answered Nov 04 '10 at 02:23 PM
Try setting the drag to something like 1, and just play around with it.
Angular drag is for slowing rotation speeds.
In actual space, you wouldn't slow down, because there is nothing to slow you down. But that might make a pretty crazy game.
And using AddForce is the right thing to do (if you get the desired result)
answered Nov 04 '10 at 02:12 PM