Merge pull request #91581 from TheKiromen/improve-physics-server-documentation

Update `area_create` description in `PhysicsServer2D/3D` to clear up possible confusions
This commit is contained in:
Rémi Verschelde 2024-05-06 15:15:32 +02:00
commit 608096e55e
No known key found for this signature in database
GPG key ID: C3336907360768E1
2 changed files with 4 additions and 2 deletions

View file

@ -52,7 +52,8 @@
<method name="area_create">
<return type="RID" />
<description>
Creates a 2D area object in the physics server, and returns the [RID] that identifies it. Use [method area_add_shape] to add shapes to it, use [method area_set_transform] to set its transform, and use [method area_set_space] to add the area to a space.
Creates a 2D area object in the physics server, and returns the [RID] that identifies it. The default settings for the created area include a collision layer and mask set to [code]1[/code], and [code]monitorable[/code] set to [code]false[/code].
Use [method area_add_shape] to add shapes to it, use [method area_set_transform] to set its transform, and use [method area_set_space] to add the area to a space. If you want the area to be detectable use [method area_set_monitorable].
</description>
</method>
<method name="area_get_canvas_instance_id" qualifiers="const">

View file

@ -44,7 +44,8 @@
<method name="area_create">
<return type="RID" />
<description>
Creates an [Area3D].
Creates a 3D area object in the physics server, and returns the [RID] that identifies it. The default settings for the created area include a collision layer and mask set to [code]1[/code], and [code]monitorable[/code] set to [code]false[/code].
Use [method area_add_shape] to add shapes to it, use [method area_set_transform] to set its transform, and use [method area_set_space] to add the area to a space. If you want the area to be detectable use [method area_set_monitorable].
</description>
</method>
<method name="area_get_collision_layer" qualifiers="const">