summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2024-05-06 15:15:32 +0200
committerRémi Verschelde <rverschelde@gmail.com>2024-05-06 15:15:32 +0200
commit608096e55efb0716d9c4f3e1df30113069d309c7 (patch)
treeb1d994a90be2f669ceb0e08915271ba2f5043b27
parentc01441e7ed0f56281ac2dd7f7f9594a44edad717 (diff)
parent2b5e0d98d2010d519b8d05417f804961ea8fb3df (diff)
downloadredot-engine-608096e55efb0716d9c4f3e1df30113069d309c7.tar.gz
Merge pull request #91581 from TheKiromen/improve-physics-server-documentation
Update `area_create` description in `PhysicsServer2D/3D` to clear up possible confusions
-rw-r--r--doc/classes/PhysicsServer2D.xml3
-rw-r--r--doc/classes/PhysicsServer3D.xml3
2 files changed, 4 insertions, 2 deletions
diff --git a/doc/classes/PhysicsServer2D.xml b/doc/classes/PhysicsServer2D.xml
index d40326fa21..def0c2bd91 100644
--- a/doc/classes/PhysicsServer2D.xml
+++ b/doc/classes/PhysicsServer2D.xml
@@ -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">
diff --git a/doc/classes/PhysicsServer3D.xml b/doc/classes/PhysicsServer3D.xml
index 4a4a1ad025..28ef03614a 100644
--- a/doc/classes/PhysicsServer3D.xml
+++ b/doc/classes/PhysicsServer3D.xml
@@ -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">