Project

General

Profile

Bug #14105

Location of Center of Mass when not defined in model

Added by OminousPenguin 19 days ago. Updated 9 days ago.

Status:
New
Priority:
Low
Assignee:
-
Category:
Parts
Target version:
-
Start date:
03/10/2017
% Done:

0%

Version:
Platform:
Windows

Description

Several parts do not have their center of mass defined in their model; the result should be that their mass is located at the part root but what actually happens is their mass is located at the CoM of their parent part.

See attached screenshots which show the location of the CoM in the editor with two test parts:
An OX-4W 3x2 solar panel and a Z-400 battery.

base.jpg shows two Tail Connectors attached end to end. The CoM is in the middle.

Images a1 through a5.jpg show the solar panel in 5 positions along the tail connectors. Observe that the CoM is different in all 5 screenshots and depends on the position of the solar panel.

Images b1 and b2.jpg show the battery in two different positions on one of the tail connectors. Observe that the CoM is the same in both screenshots and does not depend on the location of the battery.
Images b3 and b4.jpg show the same effect on the other tail connector.

Observe that the CoM is different between b2 and b3 (or b1 and b4) because the battery's parent is the different tail connector. This shows that the battery does indeed have mass, but that mass is being located at the CoM of it's parent part.

This is not a bug in the CoM indicator in the editor. A simple see-saw vessel can be constructed to demonstrate the effect in the physics of the game:
Position 2 batteries: One in the position shown in b1.jpg and one in the position shown in b3.jpg. The vessel should tip towards the battery furthest from the lever fulcrum but in fact the vessel is balanced. If you replace the batteries with solar panels, you can see that the vessel tips over correctly.

There are several stock parts that exhibit the same incorrect behaviour.

I assume this is something to do with the model because the CoM is not defined in the part cfg.
Adding CoMOffset = 0.0, 10.0, 0.0 had no effect.

Adding the missing CoM position to the models would fix the issue for those models, however it would be much better to fix the game to use the part root as the CoM instead of the parent part's CoM. This solution would mean all existing parts without CoMs, both stock and mods, would work as expected.

Thanks for all your hard work!

a1.jpg View (217 KB) OminousPenguin, 03/10/2017 11:51 PM

a2.jpg View (217 KB) OminousPenguin, 03/10/2017 11:51 PM

a3.jpg View (215 KB) OminousPenguin, 03/10/2017 11:51 PM

a4.jpg View (215 KB) OminousPenguin, 03/10/2017 11:51 PM

b1.jpg View (217 KB) OminousPenguin, 03/10/2017 11:51 PM

a5.jpg View (215 KB) OminousPenguin, 03/10/2017 11:51 PM

b2.jpg View (217 KB) OminousPenguin, 03/10/2017 11:51 PM

b3.jpg View (216 KB) OminousPenguin, 03/10/2017 11:51 PM

b4.jpg View (216 KB) OminousPenguin, 03/10/2017 11:51 PM

base.jpg View (213 KB) OminousPenguin, 03/10/2017 11:51 PM

27895
27896
27897
27898
27899
27900
27901
27902
27903
27904

History

#1 Updated by OminousPenguin 19 days ago

I wasn't sure if this should be categorised as Parts or Physics.

#2 Updated by Starwaster 9 days ago

There's no such thing as a model not having CoM defined on it. What's actually happening here is that several of the parts you are testing with are not 'physically significant' (i.e. they have PhysicsSignificance = 1 set in their configs)

Essentially those parts are 'physicsless'. (or they have an extremely simplified physics). One of the effects of this is that their mass is added to their parents. And they do not get force applied to them but instead get it applied to their parents.

So really, it's not that some parts are missing something. It's that they have been deliberately configured to have simplified physics.

#3 Updated by OminousPenguin 9 days ago

Thank you for explaining.

I had misunderstood step 9 from here: http://wiki.kerbalspaceprogram.com/wiki/Tutorial:Making_an_asset_from_start_to_finish

The issue I was having was trying to balance a craft with a Mystery Goo Containment Unit (0.05t) on one side and two Z-400 batteries (2x0.002t), a Barometer (0.005t) and a Seismic Accelerometer (0.005t) on the other side. According to the masses this should have been balanced, but out of these only the Mystery Goo Containment Unit has it's mass applied in the 'correct' location therefore the vessel was completely unbalanced.

I spent ages trying to work out what was causing this.

Now that I know PhysicsSignificance = 1 is the problem, I can fix it.

Also available in: Atom PDF