Expose Rotational Inertia Tensors in BasePart Properties

As a Roblox developer, it is currently too hard to derive information about what how a torque will affect a BasePart or Assembly. What I’m looking for is essentially the “Mass” and “AssemblyMass” properties of BasePart, but for angular mass instead of linear. This is vital information for rigid body physics that Roblox is lacking.

Example Issue
Let’s say you have scripted yourself a custom solution for vehicle aerodynamics, or vehicle tires, and you wanted to clamp the maximum acceleration of the solution to avoid numerical instability. How you would find the max force for this linearly:

MaxForce = AssemblyMass * MaxAcceleration

But for angular acceleration, there is no way to do this! You would have to go through every BasePart in the assembly, use some standard equations for rotational inertia, and then your end result may not match up with what the engine is using internally because it is a black box with no documentation for us!

What’s Frustrating
The engine has no data type for a 3x3 tensor, so this may be too hard/annoying to do. However BaseParts have two methods called “AngularAccelerationToTorque” and “TorqueToAngularAcceleration” that would perfectly fill this gap, but actually they are disabled for some unknown reason? If nothing else, I would love to see these methods enabled as theoretically they would fill the tensor gap assuming they would work for Assemblies, as well as including the effect of rotational dampening for our calculations.

If Roblox is able to address this issue, it would improve my development experience because I would not have to use rough estimations of rotational inertia that are incorrect.

11 Likes

Something like this is a great first step towards custom physics implementations in the engine. Would love to see this.

2 Likes

I don’t think Roblox could justify adding a whole new datatype just to use it for an inertia tensor that realistically only 12 people on this whole platform are going to find a use for. I, however, am one of those 12 people and figuring out the moment of inertia of a mesh or an assembly of parts is practically impossible.
I would propose the inertia tensor being a Vector3 instead, consisting of the moments of inertia about each principle axis, as according to a reliable source (a random website I found that doesn’t even have secure HTTP), to describe the rotational inertia of an object in its body frame you only need the moments of inertia about its principle axes, whilst a full 3x3 tensor is used to characterize its moments of inertia from different reference frames. But then again, I don’t know shit about moments of inertia and it’s very possible I’m wrong here because I spent 10 minutes total doing research, if I really am wrong and you do indeed need a 3x3 tensor to represent the rotational inertia, even in object-space, they could still add a :GetMOIAboutAxis(axis: Vector3) function to parts

2 Likes