summaryrefslogtreecommitdiff
path: root/doc/classes
diff options
context:
space:
mode:
authorMaxime Lapointe <hunter_spawn@hotmail.com>2021-09-25 08:44:18 -0400
committerMaxime Lapointe <hunter_spawn@hotmail.com>2021-10-14 15:41:26 -0400
commitb66fdb8dd22d9bd25d7524e95f28acf461d60535 (patch)
tree9ff4a6b1142f8148b34a4fd89d1be780f71e8332 /doc/classes
parent9293c76636419318a38f3e1f788c3a982dc7739a (diff)
Improve area/body_shape_entered/exited signals parameter names and doc
Fix some typoed names from the doc Add _index to "index" parameters of *_shape_* signals, this is both in doc and in the template. This makes the code, signature and doc easier to understand Add method to get Node from the _index params of those signals. This was not as easy to find as one would expect. Putting this information where it is needed will help.
Diffstat (limited to 'doc/classes')
-rw-r--r--doc/classes/Area2D.xml40
-rw-r--r--doc/classes/Area3D.xml40
-rw-r--r--doc/classes/RigidDynamicBody2D.xml20
-rw-r--r--doc/classes/RigidDynamicBody3D.xml20
4 files changed, 60 insertions, 60 deletions
diff --git a/doc/classes/Area2D.xml b/doc/classes/Area2D.xml
index 25f67f0571..ddfc3b1869 100644
--- a/doc/classes/Area2D.xml
+++ b/doc/classes/Area2D.xml
@@ -101,27 +101,27 @@
<signal name="area_shape_entered">
<argument index="0" name="area_rid" type="RID" />
<argument index="1" name="area" type="Area2D" />
- <argument index="2" name="area_shape" type="int" />
- <argument index="3" name="local_shape" type="int" />
+ <argument index="2" name="area_shape_index" type="int" />
+ <argument index="3" name="local_shape_index" type="int" />
<description>
Emitted when one of another Area2D's [Shape2D]s enters one of this Area2D's [Shape2D]s. Requires [member monitoring] to be set to [code]true[/code].
- [code]area_id[/code] the [RID] of the other Area2D's [CollisionObject2D] used by the [PhysicsServer2D].
+ [code]area_rid[/code] the [RID] of the other Area2D's [CollisionObject2D] used by the [PhysicsServer2D].
[code]area[/code] the other Area2D.
- [code]area_shape[/code] the index of the [Shape2D] of the other Area2D used by the [PhysicsServer2D].
- [code]local_shape[/code] the index of the [Shape2D] of this Area2D used by the [PhysicsServer2D].
+ [code]area_shape_index[/code] the index of the [Shape2D] of the other Area2D used by the [PhysicsServer2D]. Get the [CollisionShape2D] node with [code]area.shape_owner_get_owner(area_shape_index)[/code].
+ [code]local_shape_index[/code] the index of the [Shape2D] of this Area2D used by the [PhysicsServer2D]. Get the [CollisionShape2D] node with [code]self.shape_owner_get_owner(local_shape_index)[/code].
</description>
</signal>
<signal name="area_shape_exited">
<argument index="0" name="area_rid" type="RID" />
<argument index="1" name="area" type="Area2D" />
- <argument index="2" name="area_shape" type="int" />
- <argument index="3" name="local_shape" type="int" />
+ <argument index="2" name="area_shape_index" type="int" />
+ <argument index="3" name="local_shape_index" type="int" />
<description>
Emitted when one of another Area2D's [Shape2D]s exits one of this Area2D's [Shape2D]s. Requires [member monitoring] to be set to [code]true[/code].
- [code]area_id[/code] the [RID] of the other Area2D's [CollisionObject2D] used by the [PhysicsServer2D].
+ [code]area_rid[/code] the [RID] of the other Area2D's [CollisionObject2D] used by the [PhysicsServer2D].
[code]area[/code] the other Area2D.
- [code]area_shape[/code] the index of the [Shape2D] of the other Area2D used by the [PhysicsServer2D].
- [code]local_shape[/code] the index of the [Shape2D] of this Area2D used by the [PhysicsServer2D].
+ [code]area_shape_index[/code] the index of the [Shape2D] of the other Area2D used by the [PhysicsServer2D]. Get the [CollisionShape2D] node with [code]area.shape_owner_get_owner(area_shape_index)[/code].
+ [code]local_shape_index[/code] the index of the [Shape2D] of this Area2D used by the [PhysicsServer2D]. Get the [CollisionShape2D] node with [code]self.shape_owner_get_owner(local_shape_index)[/code].
</description>
</signal>
<signal name="body_entered">
@@ -141,27 +141,27 @@
<signal name="body_shape_entered">
<argument index="0" name="body_rid" type="RID" />
<argument index="1" name="body" type="Node2D" />
- <argument index="2" name="body_shape" type="int" />
- <argument index="3" name="local_shape" type="int" />
+ <argument index="2" name="body_shape_index" type="int" />
+ <argument index="3" name="local_shape_index" type="int" />
<description>
Emitted when one of a [PhysicsBody2D] or [TileMap]'s [Shape2D]s enters one of this Area2D's [Shape2D]s. Requires [member monitoring] to be set to [code]true[/code]. [TileMap]s are detected if the [TileSet] has Collision [Shape2D]s.
- [code]body_id[/code] the [RID] of the [PhysicsBody2D] or [TileSet]'s [CollisionObject2D] used by the [PhysicsServer2D].
+ [code]body_rid[/code] the [RID] of the [PhysicsBody2D] or [TileSet]'s [CollisionObject2D] used by the [PhysicsServer2D].
[code]body[/code] the [Node], if it exists in the tree, of the [PhysicsBody2D] or [TileMap].
- [code]body_shape[/code] the index of the [Shape2D] of the [PhysicsBody2D] or [TileMap] used by the [PhysicsServer2D].
- [code]local_shape[/code] the index of the [Shape2D] of this Area2D used by the [PhysicsServer2D].
+ [code]body_shape_index[/code] the index of the [Shape2D] of the [PhysicsBody2D] or [TileMap] used by the [PhysicsServer2D]. Get the [CollisionShape2D] node with [code]body.shape_owner_get_owner(body_shape_index)[/code].
+ [code]local_shape_index[/code] the index of the [Shape2D] of this Area2D used by the [PhysicsServer2D]. Get the [CollisionShape2D] node with [code]self.shape_owner_get_owner(local_shape_index)[/code].
</description>
</signal>
<signal name="body_shape_exited">
<argument index="0" name="body_rid" type="RID" />
<argument index="1" name="body" type="Node2D" />
- <argument index="2" name="body_shape" type="int" />
- <argument index="3" name="local_shape" type="int" />
+ <argument index="2" name="body_shape_index" type="int" />
+ <argument index="3" name="local_shape_index" type="int" />
<description>
Emitted when one of a [PhysicsBody2D] or [TileMap]'s [Shape2D]s exits one of this Area2D's [Shape2D]s. Requires [member monitoring] to be set to [code]true[/code]. [TileMap]s are detected if the [TileSet] has Collision [Shape2D]s.
- [code]body_id[/code] the [RID] of the [PhysicsBody2D] or [TileSet]'s [CollisionObject2D] used by the [PhysicsServer2D].
+ [code]body_rid[/code] the [RID] of the [PhysicsBody2D] or [TileSet]'s [CollisionObject2D] used by the [PhysicsServer2D].
[code]body[/code] the [Node], if it exists in the tree, of the [PhysicsBody2D] or [TileMap].
- [code]body_shape[/code] the index of the [Shape2D] of the [PhysicsBody2D] or [TileMap] used by the [PhysicsServer2D].
- [code]local_shape[/code] the index of the [Shape2D] of this Area2D used by the [PhysicsServer2D].
+ [code]body_shape_index[/code] the index of the [Shape2D] of the [PhysicsBody2D] or [TileMap] used by the [PhysicsServer2D]. Get the [CollisionShape2D] node with [code]body.shape_owner_get_owner(body_shape_index)[/code].
+ [code]local_shape_index[/code] the index of the [Shape2D] of this Area2D used by the [PhysicsServer2D]. Get the [CollisionShape2D] node with [code]self.shape_owner_get_owner(local_shape_index)[/code].
</description>
</signal>
</signals>
diff --git a/doc/classes/Area3D.xml b/doc/classes/Area3D.xml
index e91cfd79a1..896bfcd14e 100644
--- a/doc/classes/Area3D.xml
+++ b/doc/classes/Area3D.xml
@@ -120,27 +120,27 @@
<signal name="area_shape_entered">
<argument index="0" name="area_rid" type="RID" />
<argument index="1" name="area" type="Area3D" />
- <argument index="2" name="area_shape" type="int" />
- <argument index="3" name="local_shape" type="int" />
+ <argument index="2" name="area_shape_index" type="int" />
+ <argument index="3" name="local_shape_index" type="int" />
<description>
Emitted when one of another Area3D's [Shape3D]s enters one of this Area3D's [Shape3D]s. Requires [member monitoring] to be set to [code]true[/code].
- [code]area_id[/code] the [RID] of the other Area3D's [CollisionObject3D] used by the [PhysicsServer3D].
+ [code]area_rid[/code] the [RID] of the other Area3D's [CollisionObject3D] used by the [PhysicsServer3D].
[code]area[/code] the other Area3D.
- [code]area_shape[/code] the index of the [Shape3D] of the other Area3D used by the [PhysicsServer3D].
- [code]local_shape[/code] the index of the [Shape3D] of this Area3D used by the [PhysicsServer3D].
+ [code]area_shape_index[/code] the index of the [Shape3D] of the other Area3D used by the [PhysicsServer3D]. Get the [CollisionShape3D] node with [code]area.shape_owner_get_owner(area_shape_index)[/code].
+ [code]local_shape_index[/code] the index of the [Shape3D] of this Area3D used by the [PhysicsServer3D]. Get the [CollisionShape3D] node with [code]self.shape_owner_get_owner(local_shape_index)[/code].
</description>
</signal>
<signal name="area_shape_exited">
<argument index="0" name="area_rid" type="RID" />
<argument index="1" name="area" type="Area3D" />
- <argument index="2" name="area_shape" type="int" />
- <argument index="3" name="local_shape" type="int" />
+ <argument index="2" name="area_shape_index" type="int" />
+ <argument index="3" name="local_shape_index" type="int" />
<description>
Emitted when one of another Area3D's [Shape3D]s enters one of this Area3D's [Shape3D]s. Requires [member monitoring] to be set to [code]true[/code].
- [code]area_id[/code] the [RID] of the other Area3D's [CollisionObject3D] used by the [PhysicsServer3D].
+ [code]area_rid[/code] the [RID] of the other Area3D's [CollisionObject3D] used by the [PhysicsServer3D].
[code]area[/code] the other Area3D.
- [code]area_shape[/code] the index of the [Shape3D] of the other Area3D used by the [PhysicsServer3D].
- [code]local_shape[/code] the index of the [Shape3D] of this Area3D used by the [PhysicsServer3D].
+ [code]area_shape_index[/code] the index of the [Shape3D] of the other Area3D used by the [PhysicsServer3D]. Get the [CollisionShape3D] node with [code]area.shape_owner_get_owner(area_shape_index)[/code].
+ [code]local_shape_index[/code] the index of the [Shape3D] of this Area3D used by the [PhysicsServer3D]. Get the [CollisionShape3D] node with [code]self.shape_owner_get_owner(local_shape_index)[/code].
</description>
</signal>
<signal name="body_entered">
@@ -160,27 +160,27 @@
<signal name="body_shape_entered">
<argument index="0" name="body_rid" type="RID" />
<argument index="1" name="body" type="Node3D" />
- <argument index="2" name="body_shape" type="int" />
- <argument index="3" name="local_shape" type="int" />
+ <argument index="2" name="body_shape_index" type="int" />
+ <argument index="3" name="local_shape_index" type="int" />
<description>
Emitted when one of a [PhysicsBody3D] or [GridMap]'s [Shape3D]s enters one of this Area3D's [Shape3D]s. Requires [member monitoring] to be set to [code]true[/code]. [GridMap]s are detected if the [MeshLibrary] has Collision [Shape3D]s.
- [code]body_id[/code] the [RID] of the [PhysicsBody3D] or [MeshLibrary]'s [CollisionObject3D] used by the [PhysicsServer3D].
+ [code]body_rid[/code] the [RID] of the [PhysicsBody3D] or [MeshLibrary]'s [CollisionObject3D] used by the [PhysicsServer3D].
[code]body[/code] the [Node], if it exists in the tree, of the [PhysicsBody3D] or [GridMap].
- [code]body_shape[/code] the index of the [Shape3D] of the [PhysicsBody3D] or [GridMap] used by the [PhysicsServer3D].
- [code]local_shape[/code] the index of the [Shape3D] of this Area3D used by the [PhysicsServer3D].
+ [code]body_shape_index[/code] the index of the [Shape3D] of the [PhysicsBody3D] or [GridMap] used by the [PhysicsServer3D]. Get the [CollisionShape3D] node with [code]body.shape_owner_get_owner(body_shape_index)[/code].
+ [code]local_shape_index[/code] the index of the [Shape3D] of this Area3D used by the [PhysicsServer3D]. Get the [CollisionShape3D] node with [code]self.shape_owner_get_owner(local_shape_index)[/code].
</description>
</signal>
<signal name="body_shape_exited">
<argument index="0" name="body_rid" type="RID" />
<argument index="1" name="body" type="Node3D" />
- <argument index="2" name="body_shape" type="int" />
- <argument index="3" name="local_shape" type="int" />
+ <argument index="2" name="body_shape_index" type="int" />
+ <argument index="3" name="local_shape_index" type="int" />
<description>
Emitted when one of a [PhysicsBody3D] or [GridMap]'s [Shape3D]s enters one of this Area3D's [Shape3D]s. Requires [member monitoring] to be set to [code]true[/code]. [GridMap]s are detected if the [MeshLibrary] has Collision [Shape3D]s.
- [code]body_id[/code] the [RID] of the [PhysicsBody3D] or [MeshLibrary]'s [CollisionObject3D] used by the [PhysicsServer3D].
+ [code]body_rid[/code] the [RID] of the [PhysicsBody3D] or [MeshLibrary]'s [CollisionObject3D] used by the [PhysicsServer3D].
[code]body[/code] the [Node], if it exists in the tree, of the [PhysicsBody3D] or [GridMap].
- [code]body_shape[/code] the index of the [Shape3D] of the [PhysicsBody3D] or [GridMap] used by the [PhysicsServer3D].
- [code]local_shape[/code] the index of the [Shape3D] of this Area3D used by the [PhysicsServer3D].
+ [code]body_shape_index[/code] the index of the [Shape3D] of the [PhysicsBody3D] or [GridMap] used by the [PhysicsServer3D]. Get the [CollisionShape3D] node with [code]body.shape_owner_get_owner(body_shape_index)[/code].
+ [code]local_shape_index[/code] the index of the [Shape3D] of this Area3D used by the [PhysicsServer3D]. Get the [CollisionShape3D] node with [code]self.shape_owner_get_owner(local_shape_index)[/code].
</description>
</signal>
</signals>
diff --git a/doc/classes/RigidDynamicBody2D.xml b/doc/classes/RigidDynamicBody2D.xml
index 059379242b..690bf5c4fc 100644
--- a/doc/classes/RigidDynamicBody2D.xml
+++ b/doc/classes/RigidDynamicBody2D.xml
@@ -167,27 +167,27 @@
<signal name="body_shape_entered">
<argument index="0" name="body_rid" type="RID" />
<argument index="1" name="body" type="Node" />
- <argument index="2" name="body_shape" type="int" />
- <argument index="3" name="local_shape" type="int" />
+ <argument index="2" name="body_shape_index" type="int" />
+ <argument index="3" name="local_shape_index" type="int" />
<description>
Emitted when one of this RigidDynamicBody2D's [Shape2D]s collides with another [PhysicsBody2D] or [TileMap]'s [Shape2D]s. Requires [member contact_monitor] to be set to [code]true[/code] and [member contacts_reported] to be set high enough to detect all the collisions. [TileMap]s are detected if the [TileSet] has Collision [Shape2D]s.
- [code]body_id[/code] the [RID] of the other [PhysicsBody2D] or [TileSet]'s [CollisionObject2D] used by the [PhysicsServer2D].
+ [code]body_rid[/code] the [RID] of the other [PhysicsBody2D] or [TileSet]'s [CollisionObject2D] used by the [PhysicsServer2D].
[code]body[/code] the [Node], if it exists in the tree, of the other [PhysicsBody2D] or [TileMap].
- [code]body_shape[/code] the index of the [Shape2D] of the other [PhysicsBody2D] or [TileMap] used by the [PhysicsServer2D].
- [code]local_shape[/code] the index of the [Shape2D] of this RigidDynamicBody2D used by the [PhysicsServer2D].
+ [code]body_shape_index[/code] the index of the [Shape2D] of the other [PhysicsBody2D] or [TileMap] used by the [PhysicsServer2D]. Get the [CollisionShape2D] node with [code]body.shape_owner_get_owner(body_shape_index)[/code].
+ [code]local_shape_index[/code] the index of the [Shape2D] of this RigidDynamicBody2D used by the [PhysicsServer2D]. Get the [CollisionShape2D] node with [code]self.shape_owner_get_owner(local_shape_index)[/code].
</description>
</signal>
<signal name="body_shape_exited">
<argument index="0" name="body_rid" type="RID" />
<argument index="1" name="body" type="Node" />
- <argument index="2" name="body_shape" type="int" />
- <argument index="3" name="local_shape" type="int" />
+ <argument index="2" name="body_shape_index" type="int" />
+ <argument index="3" name="local_shape_index" type="int" />
<description>
Emitted when the collision between one of this RigidDynamicBody2D's [Shape2D]s and another [PhysicsBody2D] or [TileMap]'s [Shape2D]s ends. Requires [member contact_monitor] to be set to [code]true[/code] and [member contacts_reported] to be set high enough to detect all the collisions. [TileMap]s are detected if the [TileSet] has Collision [Shape2D]s.
- [code]body_id[/code] the [RID] of the other [PhysicsBody2D] or [TileSet]'s [CollisionObject2D] used by the [PhysicsServer2D].
+ [code]body_rid[/code] the [RID] of the other [PhysicsBody2D] or [TileSet]'s [CollisionObject2D] used by the [PhysicsServer2D].
[code]body[/code] the [Node], if it exists in the tree, of the other [PhysicsBody2D] or [TileMap].
- [code]body_shape[/code] the index of the [Shape2D] of the other [PhysicsBody2D] or [TileMap] used by the [PhysicsServer2D].
- [code]local_shape[/code] the index of the [Shape2D] of this RigidDynamicBody2D used by the [PhysicsServer2D].
+ [code]body_shape_index[/code] the index of the [Shape2D] of the other [PhysicsBody2D] or [TileMap] used by the [PhysicsServer2D]. Get the [CollisionShape2D] node with [code]body.shape_owner_get_owner(body_shape_index)[/code].
+ [code]local_shape_index[/code] the index of the [Shape2D] of this RigidDynamicBody2D used by the [PhysicsServer2D]. Get the [CollisionShape2D] node with [code]self.shape_owner_get_owner(local_shape_index)[/code].
</description>
</signal>
<signal name="sleeping_state_changed">
diff --git a/doc/classes/RigidDynamicBody3D.xml b/doc/classes/RigidDynamicBody3D.xml
index 9b6bcd840b..2c06aa4072 100644
--- a/doc/classes/RigidDynamicBody3D.xml
+++ b/doc/classes/RigidDynamicBody3D.xml
@@ -170,28 +170,28 @@
<signal name="body_shape_entered">
<argument index="0" name="body_rid" type="RID" />
<argument index="1" name="body" type="Node" />
- <argument index="2" name="body_shape" type="int" />
- <argument index="3" name="local_shape" type="int" />
+ <argument index="2" name="body_shape_index" type="int" />
+ <argument index="3" name="local_shape_index" type="int" />
<description>
Emitted when one of this RigidDynamicBody3D's [Shape3D]s collides with another [PhysicsBody3D] or [GridMap]'s [Shape3D]s. Requires [member contact_monitor] to be set to [code]true[/code] and [member contacts_reported] to be set high enough to detect all the collisions. [GridMap]s are detected if the [MeshLibrary] has Collision [Shape3D]s.
- [code]body_id[/code] the [RID] of the other [PhysicsBody3D] or [MeshLibrary]'s [CollisionObject3D] used by the [PhysicsServer3D].
+ [code]body_rid[/code] the [RID] of the other [PhysicsBody3D] or [MeshLibrary]'s [CollisionObject3D] used by the [PhysicsServer3D].
[code]body[/code] the [Node], if it exists in the tree, of the other [PhysicsBody3D] or [GridMap].
- [code]body_shape[/code] the index of the [Shape3D] of the other [PhysicsBody3D] or [GridMap] used by the [PhysicsServer3D].
- [code]local_shape[/code] the index of the [Shape3D] of this RigidDynamicBody3D used by the [PhysicsServer3D].
+ [code]body_shape_index[/code] the index of the [Shape3D] of the other [PhysicsBody3D] or [GridMap] used by the [PhysicsServer3D]. Get the [CollisionShape3D] node with [code]body.shape_owner_get_owner(body_shape_index)[/code].
+ [code]local_shape_index[/code] the index of the [Shape3D] of this RigidDynamicBody3D used by the [PhysicsServer3D]. Get the [CollisionShape3D] node with [code]self.shape_owner_get_owner(local_shape_index)[/code].
[b]Note:[/b] Bullet physics cannot identify the shape index when using a [ConcavePolygonShape3D]. Don't use multiple [CollisionShape3D]s when using a [ConcavePolygonShape3D] with Bullet physics if you need shape indices.
</description>
</signal>
<signal name="body_shape_exited">
<argument index="0" name="body_rid" type="RID" />
<argument index="1" name="body" type="Node" />
- <argument index="2" name="body_shape" type="int" />
- <argument index="3" name="local_shape" type="int" />
+ <argument index="2" name="body_shape_index" type="int" />
+ <argument index="3" name="local_shape_index" type="int" />
<description>
Emitted when the collision between one of this RigidDynamicBody3D's [Shape3D]s and another [PhysicsBody3D] or [GridMap]'s [Shape3D]s ends. Requires [member contact_monitor] to be set to [code]true[/code] and [member contacts_reported] to be set high enough to detect all the collisions. [GridMap]s are detected if the [MeshLibrary] has Collision [Shape3D]s.
- [code]body_id[/code] the [RID] of the other [PhysicsBody3D] or [MeshLibrary]'s [CollisionObject3D] used by the [PhysicsServer3D]. [GridMap]s are detected if the Meshes have [Shape3D]s.
+ [code]body_rid[/code] the [RID] of the other [PhysicsBody3D] or [MeshLibrary]'s [CollisionObject3D] used by the [PhysicsServer3D]. [GridMap]s are detected if the Meshes have [Shape3D]s.
[code]body[/code] the [Node], if it exists in the tree, of the other [PhysicsBody3D] or [GridMap].
- [code]body_shape[/code] the index of the [Shape3D] of the other [PhysicsBody3D] or [GridMap] used by the [PhysicsServer3D].
- [code]local_shape[/code] the index of the [Shape3D] of this RigidDynamicBody3D used by the [PhysicsServer3D].
+ [code]body_shape_index[/code] the index of the [Shape3D] of the other [PhysicsBody3D] or [GridMap] used by the [PhysicsServer3D]. Get the [CollisionShape3D] node with [code]body.shape_owner_get_owner(body_shape_index)[/code].
+ [code]local_shape_index[/code] the index of the [Shape3D] of this RigidDynamicBody3D used by the [PhysicsServer3D]. Get the [CollisionShape3D] node with [code]self.shape_owner_get_owner(local_shape_index)[/code].
[b]Note:[/b] Bullet physics cannot identify the shape index when using a [ConcavePolygonShape3D]. Don't use multiple [CollisionShape3D]s when using a [ConcavePolygonShape3D] with Bullet physics if you need shape indices.
</description>
</signal>