- Joined
- Jan 16, 2015
- Messages
- 25
- Reaction score
- 61
The game currently uses weird and counterintuitive abstractions for rotational inertia. This is a shame, because for point arrays, the proper physics calculations are actually really easy. For a point mass at a distance from an axis, rotational inertia = distance * mass. Distance of a given point from(for instance) the Z axis would be sqrt(PosX^2 +PosY^2 ).
So, if you add a 0.1 ton(100kg) block to your ship at coords 30,10,57, then inertiaX += 100kg*sqrt(10^2 +57^2), inertiaY+=100kg*sqrt(30^2+57^2) and inertiaZ+=100kg*sqrt(30^2+10^2).
Of course, the ship core does cause a minor problem for the calculation as it is at coordinates 0,0,0. However, if we treat it as a cube, rather than a point we can calculate its rotational inertia as 1/12m(2w^2) or 1/12(100kg)(2*0.5m^2) = 8.3kg/m^2.
So, for a whole ship, the rotational inertia around a given axis is 8.3+[all the individual blocks].
The benefit of doing the calculations this way is that it will take void spaces and protrusions into acount, helping RP ships with their internal rooms and aesthetic antennae/spiky bits be less sluggish. The devs could still control overall rotation speed through modifying the torque value of a ship or adding torque-producing blocks like maneuvering thrusters or gyroscopes.
So, if you add a 0.1 ton(100kg) block to your ship at coords 30,10,57, then inertiaX += 100kg*sqrt(10^2 +57^2), inertiaY+=100kg*sqrt(30^2+57^2) and inertiaZ+=100kg*sqrt(30^2+10^2).
Of course, the ship core does cause a minor problem for the calculation as it is at coordinates 0,0,0. However, if we treat it as a cube, rather than a point we can calculate its rotational inertia as 1/12m(2w^2) or 1/12(100kg)(2*0.5m^2) = 8.3kg/m^2.
So, for a whole ship, the rotational inertia around a given axis is 8.3+[all the individual blocks].
The benefit of doing the calculations this way is that it will take void spaces and protrusions into acount, helping RP ships with their internal rooms and aesthetic antennae/spiky bits be less sluggish. The devs could still control overall rotation speed through modifying the torque value of a ship or adding torque-producing blocks like maneuvering thrusters or gyroscopes.