Einstein-Engines icon indicating copy to clipboard operation
Einstein-Engines copied to clipboard

The Great Mass'ening

Open VMSolidus opened this issue 8 months ago • 0 comments

Description

99% of all in-game objects obtain their Physics Component and Fixtures Component from BaseItem, which has resulted in nearly every object in the entire game sharing the same weight of only 5 kilograms. This game has a surprising variety of physics systems that actually care about the mass of objects, so it's pretty much a crime against humanity that every object has the same mass.

  • Throwing objects involves a set amount of force being applied as an impulse. If every object weighs the same, that means players throw them all with the same force.

  • Bullet casings weigh FIVE KILOGRAMS, and are ejected by this same throwing system, so their astoundingly high weight means they go pretty much nowhere. Even the bullet casings should have different weights, so that they can be launched with their own unique velocity.

  • #342 reworks Space Wind to respect an object's mass, but every item having the same mass means they all get yeeted with the same force. This is wildly incorrect.

I would like for most of the game's items to have mass relatively accurately reflect a real world expectation of mass. This is primarily done by adjusting their fixture density. Not every item must be individually set, in most cases there are Parent hierarchies of similar items, such that if all the items that share a Parent are essentially identical to each other in mass, then only their parent needs to have its Mass fixed.

FOR ANYONE WISHING TO TACKLE THIS. PLEASE DON'T JUST DO EVERY ENTITY AT ONCE. Stick to one or two files at a time, only one if it's a mega file containing just a shitton of entities, and no more than 5 if it's a category of mini-yml files containing 1 or 2 entities.

Here is a graphing calculator preloaded with the necessary equations for setting Mass via fixture density. https://www.desmos.com/calculator/izclvpllru

VMSolidus avatar Jun 14 '24 20:06 VMSolidus