Fix description about CharacterBody velocity and delta#111102
Fix description about CharacterBody velocity and delta#111102Repiteo merged 1 commit intogodotengine:masterfrom
Conversation
|
This text was recently added by @RolandMarchand in PR #109925, maybe he would like to give feedback on this. |
Errors should be discouraged, and multiplying a velocity vector by |
|
@RolandMarchand This PR is saying the same thing as you're describing. The original sentence discourages any form of The key point is, The root cause of the error lies in users not caring about the units of values. The original wording not only has false positives, but also encouraged the root error rather than resolving it. |
aaronfranke
left a comment
There was a problem hiding this comment.
One of these days it would be cool to add F#-style units to GDScript.
There was a problem hiding this comment.
I do personally prefer the wording in this PR, albeit it's a bit too technical. Note that there's a similar remark in move_and_slide's description that should probably be changed for consistency.
@Mickeon I think that part is fine since it's just explaining why
|
|
Thanks! |
|
I think the focus of his problem is not on the unit, but on clearly stating in the description of the move_and_slide method that the delta parameter has already been used for calculation. Similar to what the direction_to method explicitly states as returning a normalized vector. At present, this page(https://docs.godotengine.org/en/latest/tutorials/physics/physics_introduction.html#move -and-slide) indicates this point, but the built-in document method description has not been updated synchronously. |
The way values are calculated should not be discouraged. It's the unit that matters. For example, multiplying an acceleration by delta gives a perfectly normal velocity vector.