Godot 3.1+
Currently the center of mass of a RigidBody is considered to be its position (aka its origin). This is impractical in physics-based games where you need dynamic construction or destruction of such body with multiple shapes in it, or if the shapes have variable density, because it forces you to offset all the shapes just to match where you want the COM to be, everytime mass repartition changes.
I am building a 3D prototype where the player can build a custom vehicle, so such feature would be really helpful, and I can imagine it to be helpful as well in 2D.
The most helpful feature would be inertia tensor config for RigidBody and VehicleBody. Bullet supports this; so it is more of property addition. While one can just move meshes and colliders to move center of mass, one currently can't change inertia tensor which is very important for vehicles.
@slapin does inertia tensor makes sense for 2D? It seems like this stuff was fixed for 3D in #7426 (Godot physics), I wonder what are equivalent math for 2D behind it.
Also closely related to #12353.
@Xrayez if I understand correctly, inertia tensor relates to rotation, and 2D bodies can rotate, so probably makes sense here too.
I don't quite understand what happened between #7426 and now, since the doc says COM is at the origin, and currently in my prototype if I build a body which is unbalanced towards its Spatial origin, it will act as if the whole mass was concentrated at that origin.
You set up center of mass by relation or RigidBody origin to collision shapes and visual representation. This might not be easy for some users so helper offset might be added, but it still will be doing that.
For inertia tensor it is often common problem with vehicles that you want your vehicle body behave like a box considering rotation inertia but have convex hull collision shape. If you do not implement inertia tensor, your vehicle will have mass offset to bottom and rotate in ways that is only suitable for some arcade racers where vehicles can't turn over. Even if you say it is exactly the behavior you aim for, well you don't as ypu can't make even GTA vehicle physics with that. Well, sometimes you need completely custom inertia behavior (i.e. bikes) but that is another story (might need some more vehicle body tweaking options like custom forces integrator or angular dumping options, but even default can give okish results when tweaked).
I really want an offset for center of mass, that will help implementing different behaviors for the same object.
Exp: for arcade vehicles center of mass needs to be very low so the can can't be flipped easily, but when it gets knocked up or killed it need to reset the center of mass so it looks natural (like this example https://www.youtube.com/watch?v=LG1CtlFRmpU )
Just move your RigidBody and counter-move collision and visual mesh. Godot
could help with such common operation, but it doesn't.
On Mon, Jun 17, 2019 at 2:45 AM Oussama notifications@github.com wrote:
I really want an offset for center of mass, that will help implementing
different behaviors for the same object.Exp: for arcade vehicles center of mass needs to be very low so the can
can't be flipped easily, but when it gets knocked up or killed it need to
reset the center of mass so it looks natural (like this example
https://www.youtube.com/watch?v=LG1CtlFRmpU )—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/godotengine/godot/issues/28062?email_source=notifications&email_token=AAABPU4WSJPAZO2EMN3AG63P23GCVA5CNFSM4HGCHJV2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODXZXTOY#issuecomment-502495675,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAABPU2DOMP6X64ARQA74ADP23GCVANCNFSM4HGCHJVQ
.
@slapin This is what I am doing for now, I just don't know if the transition will not affect animations or maybe visual jitter, also it's a bit annoying to handle.
My process is this:

Even if some helper is implemented it will be still the same. If you manage
to move object without disruption of balance to physics, no unwanted side
effects will follow.
If that is needed for large number of objects at time, C++ helper is
recommended.
On Tue, Jun 18, 2019 at 3:55 AM Oussama notifications@github.com wrote:
@slapin https://github.com/slapin This is what I am doing for now, I
just don't know if the transition will not affect animations or maybe
visual jitter, also it's a bit annoying to handle.My process is this:
[image: bitmap]
https://user-images.githubusercontent.com/12987951/59645843-f33e8600-916b-11e9-9334-402729dd43e7.png—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/godotengine/godot/issues/28062?email_source=notifications&email_token=AAABPU64KTH5JGFSMJLP5DDP3AXBDA5CNFSM4HGCHJV2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODX43FGY#issuecomment-502903451,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAABPUZ3N34OANLRAQBYJK3P3AXBDANCNFSM4HGCHJVQ
.
Feature and improvement proposals for the Godot Engine are now being discussed and reviewed in a dedicated Godot Improvement Proposals (GIP) (godotengine/godot-proposals) issue tracker. The GIP tracker has a detailed issue template designed so that proposals include all the relevant information to start a productive discussion and help the community assess the validity of the proposal for the engine.
The main (godotengine/godot) tracker is now solely dedicated to bug reports and Pull Requests, enabling contributors to have a better focus on bug fixing work. Therefore, we are now closing all older feature proposals on the main issue tracker.
If you are interested in this feature proposal, please open a new proposal on the GIP tracker following the given issue template (after checking that it doesn't exist already). Be sure to reference this closed issue if it includes any relevant discussion (which you are also encouraged to summarize in the new proposal). Thanks in advance!
Most helpful comment
The most helpful feature would be inertia tensor config for RigidBody and VehicleBody. Bullet supports this; so it is more of property addition. While one can just move meshes and colliders to move center of mass, one currently can't change inertia tensor which is very important for vehicles.