Rigidbody "ragdolls" stand upright by themselves?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By Tato64

Weird question but…

Basically im making an FPS, i created a rigidbody node with the same model as the enemies with a simple cilinder shape, nothing else, when an enemy dies this node spawns in it’s place, this all works as intended.

BUT…

For some reason, the rigidbody nodes seem to stand upright by themselves, even if you push and “trip” them, they slowly stand upright again as if they were “buoyant” or something, i cant seem to make them lay down and stay down.

Any ideas?

:bust_in_silhouette: Reply From: Tato64

Solved:

It is related to the collisionshape offset in relation to the rigidbody’s origin. (This seems to be the center of mass)

Removing the offset (a.k.a. reset the collisionshape’s transform) solves this issue.

Note that Godot 4.0 will offer a way to define a custom center of mass for RigidBodies: Proper support for custom mass properties in 2D/3D physics bodies by pouleyKetchoupp · Pull Request #49610 · godotengine/godot · GitHub

Calinou | 2021-10-13 21:38

Thanks, I had no idea that could be a problem

hipoojan | 2022-08-27 20:25