Skip to content

Misleading or incorrect documentation for move_local_x and move_local_y functions #11320

@RiQuY

Description

@RiQuY

Your Godot version:
4.5.stable

Issue description:
The documentation of the move_local_x and move_local_y functions are misleading or incorrect.

The docs say the following:

Applies a local translation on the node's X axis based on the Node._process()'s delta. If scaled is false, normalizes the movement.
Applies a local translation on the node's Y axis based on the Node._process()'s delta. If scaled is false, normalizes the movement.

Checking the C++ source there isn't any place where Node._process() delta is used, the function just changes the position of the Node based on the number passed through the delta_p parameter.

Tests:
Thanks to Sniffi on GDQuest Discord for providing tests.

Image Image

Suggested solution:
The description of both functions should be changed to something like the following, removing the mention of Node._process() delta:

  • move_local_x(): "Applies a local translation on the node's X axis by the delta amount."
  • move_local_y(): "Applies a local translation on the node's Y axis by the delta amount."

I didn't open a PR because I'm not sure in how many places or repositories this change needs to be applied.

URL to the documentation page:

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:class referenceIssues and PRs about the class reference, which should be addressed on the Godot engine repositorybug

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions