Godot: Ambiguous documentation for RigidBody2D.get_inertia()

Created on 19 Oct 2017  路  3Comments  路  Source: godotengine/godot

The text in the description is a bit amateurish:

https://github.com/godotengine/godot/blob/f52ab8d86418a67ddee247ed7765e72935b0c57f/doc/classes/RigidBody2D.xml#L116

Return the body's moment of inertia. This is usually automatically computed from the mass and the shapes. Note that this doesn't seem to work in a _ready function: it apparently has not been auto-computed yet.

The words "seem" and "apparently" give an impression that the it's not known for sure. Since this is the official documentation, it should be stated what it is (or isn't), not that it "seems" to be.

(Sorry if this sounds harsh. It is certainly better than no documentation, but I think it can be improved and I don't quite have the time to check right now).

documentation enhancement junior job

Most helpful comment

Might be worth grepping the docs for uses of words like "seem", "apparently", "probably", "maybe" to find potential candidates for "unprofessional"/"I wasn't sure about it" docs.

All 3 comments

Maybe it just needs to be revised to explicitly state it requires at least one physics frame to process before it will provide a valid value.

Returns the body's moment of inertia. Automatically computes inertia from associated
[class CollisionShape]s' mass during physics frames, after the [code]_ready[/code] function has 
triggered.

...or something?

This whole doc is in need of a rewrite. The doc sprints have been focused on filling in undocumented classes, but this one could use some love as well.

Might be worth grepping the docs for uses of words like "seem", "apparently", "probably", "maybe" to find potential candidates for "unprofessional"/"I wasn't sure about it" docs.

Was this page helpful?
0 / 5 - 0 ratings