godotengine / godot-docs

Godot Engine official documentation
https://docs.godotengine.org
Other
3.95k stars 3.22k forks source link

center_of_mass in RigidBody3D is missleading #10000

Open Altarick opened 1 month ago

Altarick commented 1 month ago

Your Godot version: 4.3-stable_win64 Issue description: The documentation for center_of_mass in RigidBody3D is a bit confusing and contradictory, an important precision should be added to avoid confusion.

The page states that center_of_mass is "The body's custom center of mass" but also that "When center_of_mass_mode is set to CENTER_OF_MASS_MODE_AUTO (default value), the center of mass is automatically computed.". However it seems that even if the center of mass is automatically computed in this case, it is not made accessible through center_of_mass

Thus the documentation should warn for this, and read something like "When center_of_mass_mode is set to CENTER_OF_MASS_MODE_AUTO (default value), the center of mass is automatically computed for internal usage, but center_of_mass will be not be set to the computed value."

At least two people fell for it : https://www.reddit.com/r/godot/comments/1fn1ube/why_is_the_center_of_mass_being_calculated_as_000/

URL to the documentation page: https://docs.godotengine.org/en/stable/classes/class_rigidbody3d.html#class-rigidbody3d-property-center-of-mass

If you know how to fix the issue you are reporting please consider opening a pull request. We provide a tutorial on using git here: https://docs.godotengine.org/en/stable/community/contributing/pr_workflow.html, writing documentation at https://docs.godotengine.org/en/stable/community/contributing/docs_writing_guidelines.html and contributing to the class reference here: https://docs.godotengine.org/en/stable/community/contributing/updating_the_class_reference.html