Rename PathFollow's offset
s to progress
& progress_ratio
#64804
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Partially closes godotengine/godot-proposals#5104
As brought up in #54161 (comment).
Properties containing "offset" are very vaguely utilised across the language. Often that's fine, but for both PathFollow2D and PathFollow3D it's particularly egregious. There's
offset
,unit_offset
,h_offset
andv_offset
. The latter two refer to the visual offset, and unlike other classes (such as Sprite2D), these cannot be unified as a single Vector2 value, because the singularoffset
property already exists, referring to the offset along the curve. This PR attempts to fix one part of that.For both PathFollow2D and PathFollow3D:
offset
->progress
unit_offset
->progress_ratio
I find the name "progress" to be quite suitable and a much more specific term. Think of "The progress along the track, measured in units of distance".
Meanwhile, "ratio" fits a lot more than "unit" to to imply the range between
0.0
and1.0
. The new name also allows it to be grouped better along with "progress" This name would also bring more consistency with this other PR: #64665Applies for both PathFollow2D and PathFollow3D. Updates documentation and project converter, as well.