Merge pull request #42824 from madmiraal/update-intersect_point-doc-3.2

[3.x] Update intersect_point documentation to mention solid shapes.
This commit is contained in:
Rémi Verschelde 2021-03-26 15:48:36 +01:00 committed by GitHub
commit b450c0091a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -65,13 +65,14 @@
<argument index="5" name="collide_with_areas" type="bool" default="false">
</argument>
<description>
Checks whether a point is inside any shape. The shapes the point is inside of are returned in an array containing dictionaries with the following fields:
Checks whether a point is inside any solid shape. The shapes the point is inside of are returned in an array containing dictionaries with the following fields:
[code]collider[/code]: The colliding object.
[code]collider_id[/code]: The colliding object's ID.
[code]metadata[/code]: The intersecting shape's metadata. This metadata is different from [method Object.get_meta], and is set with [method Physics2DServer.shape_set_data].
[code]rid[/code]: The intersecting object's [RID].
[code]shape[/code]: The shape index of the colliding shape.
Additionally, the method can take an [code]exclude[/code] array of objects or [RID]s that are to be excluded from collisions, a [code]collision_mask[/code] bitmask representing the physics layers to check in, or booleans to determine if the ray should collide with [PhysicsBody]s or [Area]s, respectively.
[b]Note:[/b] [ConcavePolygonShape2D]s and [CollisionPolygon2D]s in [code]Segments[/code] build mode are not solid shapes. Therefore, they will not be detected.
</description>
</method>
<method name="intersect_point_on_canvas">