godotengine / godotengine/godot-docs

Control's _has_point(point) documentation contains incorrect suggestion

Open
#11,563 1 comment 0 reactions 0 assignees View on GitHub
area:class reference enhancement
Dominant language
reStructuredText
Stars
5.7k
Forks
3.8k
Avg merge
1d 20h
Merged PRs (30d)
25

Description

**Version 4.5**

**Control's _has_point() documentation contains incorrect suggestion**
The documentation for Control's _has_point() method has the following note:
` Note: If you want to check if a point is inside the control, you can use Rect2(Vector2.ZERO, size).has_point(point).
`
This is incorrect; this will check if a point is in a rectangle originating at the top left of the screen. `get_global_rect().has_point(point)
`
seems to be the correct check

**https://docs.godotengine.org/en/stable/classes/class_control.html#class-control-private-method-has-point**

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.