We're working on "phase one" of a game/simulation physics engine - the phase that accumulates forces and torques, then turns them into linear and angular acceleration/velocity/position. We already have "phase two" finished and working well (except a few unusual cases we want to handle more efficiently), and we'll get to "phase three" (collision response) when we get there.
We have functions written to compute native (local-coordinates) inverse inertia tensors when necessary (at object creation and after [non-linear] scaling), and the time has arrived to:
#1: accumulate forces and torques for each object.
#2: convert them into linear and angular acceleration for each object.
#3: compute new linear and angular velocity and position for each object.
At this point, to perform step #1 (accumulate force & torque), two basic formula seem popular:
force = force + newforce;
torque = torque + (point x newforce);
The accumulated force and newforce and torque and point are all in local-coordinates with the origin at the center-of-mass of the object, mostly because that is most convenient in our engine. In the moderately rare case a point or newforce is more naturally available in world-coordinates, we simply multiply by our world-to-local matrix to get the point or vector in local-coordinates.
Though our engine can load conventional objects, our engine is designed and optimized for "procedurally generated content". So most game objects are tweaks and fiddles of our ~40 fundamental shapes, and/or assemblies of any number of these fundamental shapes permanently "bonded" together, or attached together (and able to articulate). The inertia tensors of every fundamental shape is a "diagonal matrix". As such, every element of the matrix is zero, except the m00, m11, m22 diagonal elements, and the "inverse" is simply the matrix itself with a unary negative before each of the diagonal elements. Simple! Though yes, life will become a bit less simple whenever we bond or attach these fundamental shape objects together with some objects in crazy orientations relative to others (to deal with "manana").
So, now for some questions...
#1: Not all, but seemingly a majority of physics and game engines transform whichever forces and points (where forces are applied) that happen to be in local-coordinates into world-coordinates. Then they execute those force and torque accumulation equations noted above, and thus accumulate their total force and torque in world-coordinates.
Why? So far at least, most forces and points of application are naturally in local-coordinates. For example, every thrust-producing rocket is attached to a spacecraft or space-station or mothership. And thus the position of the thruster is automatically known in local-coordinates, as is the thrust-direction (almost always entirely in x or y or z in local-coordinates). While gravity in our application is not really in any major coordinate system (the force vectors are between whatever massive objects are nearby (stars, planets, moons, etc) or very nearby (motherships, space-stations, spacecraft, etc), to compute the gravity vector in local-coordinates is trivial and fast (plus, gravity doesn't generate torque, so the torque equation isn't even executed).
#2: Not all, but seemingly a majority of physics and game engines transform the inertia tensor and/or inverse inertia tensor from its natural "local-coordinates form" to decidely not-natural "world-coordinates form". Presumably they do this because they transformed every force-vector and position into world-coordinates during the force and torque accumulation phase (for some odd (to us) reason). As a result, the output of their computation is linear and angular acceleration in world-coordinates.
While world-coordinates are convenient for translation (moving the center of mass of game objects), rotation is more natural in local-coordinates. I'm not suggesting this is because we prefer to apply rotation as object-relative "yaw, pitch, roll", but because even rotation via axis-angle or quaternion (also an axis-angle approach) is more natural in local-coordinates. Yes, I do recognize this part is a "wash" when it comes to compute cycles, because rotation around object-axes versus world-axes is simply the difference in operand order in one multiply.
Nonetheless, from the perspective of someone in the spacecraft (or other vehicle), the control of the orientation of that spacecraft is vastly more natural in local-coordinates. And to some degree (but less overwhelmingly), the control of translation of that spacecraft is more natural in local-coordinates ("go straight ahead" or "turn/bank right" versus ("continue in direction <+0.2365439352, -0.113554354, +0.523433959, +0.035442342> or <however one would figure out what "turn/bank right" means> in axis-angle form).
#3: Thus the combined question is: why convert lots of natively local-coordinate forces and positions into world-coordinates, then transform a natively simple inverted inertia tensor with only three non-zero elements... into world-coordinate forces and positions, and a totally scrambled world-coordinate version of the inverted inertia tensor? And then (perhaps) convert the angular velocity and orientation back to local-coordinates at the end (or else have to convert all subsequent intuitively local-coordinate course-coorections into totally non-intuitive world-coordinate alternatives)?
I do suppose a game that takes place in flatland (the surface of a huge planet) would have somewhat more world-coordinate forces and positions than a space, airplane, submarine or other freeform game, but still not an overwhelming majority. After all, I would imagine any force applied to an object would need to be known in local-coordinates too, to complete other processes and computations.
PS: As an aside, a routine to transform with an inverse inertia tensor that only contains the diagonal elements is much shorter and quicker than a full-blown transformation by an inverse inertia tensor that has been transformed to world-coordinates. So not only do we not need to transform the inverse inertia tensor, but also every time we compute a torque with the inverse inertia tensor, that operation is much quicker too.
-----
Now, onto a different question, albeit somewhat related.
I can't even figure out what in practice is meant by "apply a force in direction dx,dy,dz at point px,py,pz for duration t seconds". Now, on the surface, I admit this sounds like "crazy talk"... doesn't this moron know what vectors and points are?
Well, I guess it feels a bit humbling after creating a whole working 3D graphics engine to say "not really"! But I'm serious. When you get finished laughing at me (which is okay, do enjoy yourself), let me create a very simple example and ask what is meant by that phase --- which we need to understand to perform these simple steps!
Okay, let's take a very simple case. For example, a 1 meter radius sphere or disk that starts out floating (not moving) in deep space (between galaxies). For purposes of our first simple example, we will only apply force along the z-axis (towards higher values of z as time passes), directly towards a neighboring galaxy 3 million light years away.
If you imagine the disk instead of the sphere (which might help later on), assume the symmetry axis of the disk is the y-axis. So if the disk ever rotates, it will have to rotate around the y-axis. The positive end of the x-axis extends rightward from the sphere or disk, at right angles to both y-axis and z-axis.
Okay, so now we want to apply a 1000 gram force to the rightmost edge of the sphere or disk for 1 second. Now, 1 second is a rather long frame time, but hey, not much is happening out here between galaxies, and this moderately longer frame time helps make my stupidity easier for smarter folks to understand.
Now, here are some questions this example raises in my puny brain:
#1: Every source I've read claims the full 1000 gram newforce in direction <0, 0, 1> applied at point <1, 0, 0> tangent to the sphere or disk gets directly summed into the force accumulator variable force without regard for what point on the object that force is applied. In other words, the full 1000 grams of newforce in the z-direction is accumulated, exactly as much and in the same direction as if that force had been applied through the center of mass (at the center of the sphere or disk). Is this really right? Yes, I know. Every source says so... but this is quite non-intutive if you ask me! My intuition wants to believe some of that newforce is consumed to add some torque (around the y-axis) to that object. Yeah, I know, I know, intuition isn't math, and intuition isn't physics either! But conservation of energy has to mean something around here, doesn't it? Trick question?
#2: Indeed, every source I've read claims this 1000 gram newforce in direction <0, 0, 1> applied at point <1, 0, 0> tangent to the sphere or disk does in fact add torque around the y-axis of the object, which will cause the object to start rotating counterclockwise when looking up the positive y-axis from the origin. But if someone at rest was to capture the sphere or disk, and convert the linear motion to energy with 100% efficiency, and convert the rotational motion to energy with 100% efficiency... would they not end up extracting more energy than they would have if we had continually applied the same 1000 grams of force through the center of mass? Why is this not a perpetual motion machine that we all should take advantage of?
But now I want to ask even simpler (and dumber) questions!
#3: Like, what does it even mean to "apply 1000 grams of newforce in direction <0, 0, 1> to the point at <1, 0, 0> for 1 second"? No, I'm not kidding, and I'm not asking in jest, I'm asking seriously. I guess there may be two versions of this question (believe it or not), so I'll ask them separately to avoid causing any more confusion than I already suffer.
#3A: The local-coordinates version of question #3. Let's assume we paint a tiny black dot on our sphere or disk at that point at <0, 0, 1> in local-coordinates AKA object-coordinates. Okay, now, what do we mean by "apply 1000 grams of newforce in direction <0, 0, 1> to that point at <1, 0, 0> for 1 second"? Seriously? I mean, during that 1 second, that black dot we painted at that point we specified at <1, 0, 0> starts to move around in a circle (relative to the object), and in some kind of string with loopy cycles (relative to the world).
And so, my stupid (yet completely sincere) question is this. Do we keep that 1000 grams of force applied:
1: To that exact same point in 3D world coordinate space that we initially applied the force, even as the object wanders away due to our application of force? If so, how the yonk can we apply force to an object at a point that is not physically part-of or attached-to the object?
2: To the point on the very rightmost periphery of the sphere or disk, meaning that point on the sphere or disk with the greatest x-coordinate, no matter how the sphere or disk moves or rotates? If so, how can we apply force to an object at constantly varying points as the object moves and rotates? Do we need to put some little paddle-wheels on the periphery of the sphere or disk, then fly some very fancy, very responsive servo-controlled air-nozzle along a strange spiral path in order to keep applying a force in direction <0, 0, 1> exactly on the little rotating paddlewheels that happen to be at the greatest x coordinate on the object at every moment?
3: To that little black dot we painted on the sphere or disk that was at <1, 0, 0> at the start of this 1 second duration, even as that dot wanders around in circles (relative to the disk) and spiral loops (relative to world-coordinates)? What kind of physical contraption could even apply a force in a constant <0, 0, 1> direction as that dot spiraled around in circles?
4: How are we to even unambiguously understand what is meant by "apply force in a given direction to a specific point for some duration"?
5, 6, 7, 8: All these same questions (1, 2, 3, 4 just above) if the force-direction and point are given in world-coordinates instead of local-coordinates?
9: And how can we answer all these very practical questions for any specific physical devices, situations and configurations we ever encounter in the future?