Skip to content

Out of date: Mouse and input coordinates page #8074

@PickleJesus123

Description

@PickleJesus123

Your Godot version:
4.1.1

Issue description:
The GDScript code snippet is not functional in 4.1.1, since get_viewport_rect() no longer exists.

Please update
print("Viewport Resolution is: ", get_viewport_rect().size)
to
print("Viewport Resolution is: ", get_viewport().size)

URL to the documentation page:
https://docs.godotengine.org/en/stable/tutorials/inputs/mouse_and_input_coordinates.html

If you know how to fix the issue you are reporting please
consider opening a pull request. We provide a tutorial on
using git here: https://docs.godotengine.org/en/stable/community/contributing/pr_workflow.html,
writing documentation at https://docs.godotengine.org/en/stable/community/contributing/docs_writing_guidelines.html
and contributing to the class reference here: https://docs.godotengine.org/en/stable/community/contributing/updating_the_class_reference.html

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions