Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

General lack of clarity for Camera2D properties and methods. #5417

Closed
Mickeon opened this issue Nov 28, 2021 · 1 comment · Fixed by godotengine/godot#55699
Closed

General lack of clarity for Camera2D properties and methods. #5417

Mickeon opened this issue Nov 28, 2021 · 1 comment · Fixed by godotengine/godot#55699
Labels
area:class reference Issues and PRs about the class reference, which should be addressed on the Godot engine repository enhancement

Comments

@Mickeon
Copy link
Contributor

Mickeon commented Nov 28, 2021

Your Godot version:
v3.4.stable
Issue description:
Some sections of Camera2D's documentation seem to be written too vaguely. Its properties depend on each other, yet these refer to each other inconsistently in their own descriptions. It doesn't help that some Camera2D's property names can be somewhat confusing, further hurting the readability of the documentation.

General list of issues:

  • Missing explanations to mitigate the confusion between Camera2D properties with similar names.
  • Small, but several, unintuitive word choices, such as different terms being used to refer to the same concept (e.g. target or tracked node, camera move or camera scroll), or vague definitions that cause ambiguity (camera position, offset)

A specific list of examples:

  • align: "Aligns the camera to the tracked node" inconsistency with smoothing_enabled and rotating's description ("camera smoothly moves towards the target" and "the camera rotates with the target", respectively);
  • rotating: "If true, the camera rotates with the target" is a possibly misleading description, as the Camera2D node itself does rotate through its parent class Node2D's rotation properties;
  • smoothing_speed: "Speed in pixels per second of the camera's smoothing effect", may not actually be speed in pixels per second. Camera2D smoothing calculation appears incorrect godot#49747 (comment)
  • limit_smoothed: "This has no effect if smoothing is disabled." should reference the property directly "This property has no effect if smoothing_enabled is set to false";
  • offset_h: "Note: Offset H is used only to force offset relative to margins. It's not updated in any way if drag margins are enabled and can be used to set initial offset" may be worded better. "Offset H" should not be capitalised like this, as it refers to the property directly;
  • offset_v: Should have the same note as offset_h instead of referring to it, for integrity and consistency with similar documentation;
  • get_camera_position ( ): Lack of further detail on what the returned value is, missing comparison to get_camera_screen_center ( ), despite both returning similar values upon first glance;
  • make_current ( ): "Make this the current 2D camera for the scene (viewport and layer), in case there are many cameras in the scene" is very awkwardly worded (perhaps even incorrect?), missing reference to the current property that serves a similar purpose;
  • reset_smoothing ( ): "This has no effect if smoothing is disabled" should reference the property directly "This method has no effect if smoothing_enabled is set to false".

Some of these examples are down to opinion, but the main issue is a lack of consistency. The Camera2D node has some minor, cumulative complexities that should be explained more clearly.

URL to the documentation page (if already existing):
https://docs.godotengine.org/en/stable/classes/class_camera2d.html?#class-camera2d-property-current

@Calinou Calinou added the area:class reference Issues and PRs about the class reference, which should be addressed on the Godot engine repository label Nov 28, 2021
@Calinou
Copy link
Member

Calinou commented Nov 28, 2021

Feel free to open a pull request for this on the main Godot repository 🙂

See Contributing to the class reference for guidelines.

Mickeon added a commit to Mickeon/godot that referenced this issue Dec 7, 2021
A summary of the tweaked descriptions:
* "get_camera_position()" is explains what the camera position is, and mitigates the confusion between this method and Node2D.position;
* "get_camera_screen_center()" links to the "get_camera_position" method;
* "reset_smoothing()" links to the "smoothing_enabled" propriety;

* "drag_horizontal_offset" and "drag_vertical_offset" link to their respective _enabled_ properties;
* "limit_smoothed" links to the "smoothing_enabled" propriety;
* "rotating" clarifies that the camera _view_ rotates when enabled.

Partially closes godotengine/godot-docs#5417, as some of the issues described are no longer present in 4.0, or are not fully solved in this PR.

Further tweaks are welcome, as I'm afraid this could be a too verbose. A few of these could be split into their PR if necessary.
akien-mga pushed a commit to akien-mga/godot that referenced this issue Dec 21, 2021
A summary of the tweaked descriptions:
* "get_camera_position()" is explains what the camera position is, and mitigates the confusion between this method and Node2D.position;
* "get_camera_screen_center()" links to the "get_camera_position" method;
* "reset_smoothing()" links to the "smoothing_enabled" propriety;

* "drag_horizontal_offset" and "drag_vertical_offset" link to their respective _enabled_ properties;
* "limit_smoothed" links to the "smoothing_enabled" propriety;
* "rotating" clarifies that the camera _view_ rotates when enabled.

Partially closes godotengine/godot-docs#5417, as some of the issues described are no longer present in 4.0, or are not fully solved in this PR.

Further tweaks are welcome, as I'm afraid this could be a too verbose. A few of these could be split into their PR if necessary.

(cherry picked from commit 6cf2623)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:class reference Issues and PRs about the class reference, which should be addressed on the Godot engine repository enhancement
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants