From cdcd4254323721b03b06f10b8469ef6667fbf58e Mon Sep 17 00:00:00 2001 From: Marcel Admiraal Date: Sun, 11 Oct 2020 11:51:54 +0100 Subject: [PATCH 1/2] Update area-body_shape_entered-exited signal documentation. --- doc/classes/Area.xml | 40 ++++++++++++++++++++++++++----------- doc/classes/Area2D.xml | 40 ++++++++++++++++++++++++++----------- doc/classes/RigidBody.xml | 20 +++++++++++++------ doc/classes/RigidBody2D.xml | 18 +++++++++++++---- 4 files changed, 84 insertions(+), 34 deletions(-) diff --git a/doc/classes/Area.xml b/doc/classes/Area.xml index 15b2bc290f47..ec164cc43cf3 100644 --- a/doc/classes/Area.xml +++ b/doc/classes/Area.xml @@ -150,14 +150,16 @@ - Emitted when another area enters. + Emitted when another Area enters this Area. Requires [member monitoring] to be set to [code]true[/code]. + [code]area[/code] the other Area. - Emitted when another area exits. + Emitted when another Area exits this Area. Requires [member monitoring] to be set to [code]true[/code]. + [code]area[/code] the other Area. @@ -170,7 +172,11 @@ - Emitted when another area enters, reporting which areas overlapped. [code]shape_owner_get_owner(shape_find_owner(shape))[/code] returns the parent object of the owner of the [code]shape[/code]. + Emitted when one of another Area's [Shape]s enters one of this Area's [Shape]s. Requires [member monitoring] to be set to [code]true[/code]. + [code]area_id[/code] the [RID] of the other Area's [CollisionObject] used by the [PhysicsServer]. + [code]area[/code] the other Area. + [code]area_shape[/code] the index of the [Shape] of the other Area used by the [PhysicsServer]. + [code]self_shape[/code] the index of the [Shape] of this Area used by the [PhysicsServer]. @@ -183,23 +189,27 @@ - Emitted when another area exits, reporting which areas were overlapping. + Emitted when one of another Area's [Shape]s enters one of this Area's [Shape]s. Requires [member monitoring] to be set to [code]true[/code]. + [code]area_id[/code] the [RID] of the other Area's [CollisionObject] used by the [PhysicsServer]. + [code]area[/code] the other Area. + [code]area_shape[/code] the index of the [Shape] of the other Area used by the [PhysicsServer]. + [code]self_shape[/code] the index of the [Shape] of this Area used by the [PhysicsServer]. - Emitted when a physics body enters. - The [code]body[/code] argument can either be a [PhysicsBody] or a [GridMap] instance (while GridMaps are not physics body themselves, they register their tiles with collision shapes as a virtual physics body). + Emitted when a [PhysicsBody] or [GridMap] enters this Area. Requires [member monitoring] to be set to [code]true[/code]. [GridMap]s are detected if the [MeshLibrary] has Collision [Shape]s. + [code]body[/code] the [Node], if it exists in the tree, of the other [PhysicsBody] or [GridMap]. - Emitted when a physics body exits. - The [code]body[/code] argument can either be a [PhysicsBody] or a [GridMap] instance (while GridMaps are not physics body themselves, they register their tiles with collision shapes as a virtual physics body). + Emitted when a [PhysicsBody] or [GridMap] exits this Area. Requires [member monitoring] to be set to [code]true[/code]. [GridMap]s are detected if the [MeshLibrary] has Collision [Shape]s. + [code]body[/code] the [Node], if it exists in the tree, of the other [PhysicsBody] or [GridMap]. @@ -212,8 +222,11 @@ - Emitted when a physics body enters, reporting which shapes overlapped. - The [code]body[/code] argument can either be a [PhysicsBody] or a [GridMap] instance (while GridMaps are not physics body themselves, they register their tiles with collision shapes as a virtual physics body). + Emitted when one of a [PhysicsBody] or [GridMap]'s [Shape]s enters one of this Area's [Shape]s. Requires [member monitoring] to be set to [code]true[/code]. [GridMap]s are detected if the [MeshLibrary] has Collision [Shape]s. + [code]body_id[/code] the [RID] of the [PhysicsBody] or [MeshLibrary]'s [CollisionObject] used by the [PhysicsServer]. + [code]body[/code] the [Node], if it exists in the tree, of the [PhysicsBody] or [GridMap]. + [code]body_shape[/code] the index of the [Shape] of the [PhysicsBody] or [GridMap] used by the [PhysicsServer]. + [code]area_shape[/code] the index of the [Shape] of this Area used by the [PhysicsServer]. @@ -226,8 +239,11 @@ - Emitted when a physics body exits, reporting which shapes were overlapping. - The [code]body[/code] argument can either be a [PhysicsBody] or a [GridMap] instance (while GridMaps are not physics body themselves, they register their tiles with collision shapes as a virtual physics body). + Emitted when one of a [PhysicsBody] or [GridMap]'s [Shape]s enters one of this Area's [Shape]s. Requires [member monitoring] to be set to [code]true[/code]. [GridMap]s are detected if the [MeshLibrary] has Collision [Shape]s. + [code]body_id[/code] the [RID] of the [PhysicsBody] or [MeshLibrary]'s [CollisionObject] used by the [PhysicsServer]. + [code]body[/code] the [Node], if it exists in the tree, of the [PhysicsBody] or [GridMap]. + [code]body_shape[/code] the index of the [Shape] of the [PhysicsBody] or [GridMap] used by the [PhysicsServer]. + [code]area_shape[/code] the index of the [Shape] of this Area used by the [PhysicsServer]. diff --git a/doc/classes/Area2D.xml b/doc/classes/Area2D.xml index 39159285ac97..40ae6b97d4d4 100644 --- a/doc/classes/Area2D.xml +++ b/doc/classes/Area2D.xml @@ -140,14 +140,16 @@ - Emitted when another area enters. + Emitted when another Area2D enters this Area2D. Requires [member monitoring] to be set to [code]true[/code]. + [code]area[/code] the other Area2D. - Emitted when another area exits. + Emitted when another Area2D exits this Area2D. Requires [member monitoring] to be set to [code]true[/code]. + [code]area[/code] the other Area2D. @@ -160,7 +162,11 @@ - Emitted when another area enters, reporting which shapes overlapped. [code]shape_owner_get_owner(shape_find_owner(shape))[/code] returns the parent object of the owner of the [code]shape[/code]. + 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 [Physics2DServer]. + [code]area[/code] the other Area2D. + [code]area_shape[/code] the index of the [Shape2D] of the other Area2D used by the [Physics2DServer]. + [code]self_shape[/code] the index of the [Shape2D] of this Area2D used by the [Physics2DServer]. @@ -173,23 +179,27 @@ - Emitted when another area exits, reporting which shapes were overlapping. + 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 [Physics2DServer]. + [code]area[/code] the other Area2D. + [code]area_shape[/code] the index of the [Shape2D] of the other Area2D used by the [Physics2DServer]. + [code]self_shape[/code] the index of the [Shape2D] of this Area2D used by the [Physics2DServer]. - Emitted when a physics body enters. - The [code]body[/code] argument can either be a [PhysicsBody2D] or a [TileMap] instance (while TileMaps are not physics body themselves, they register their tiles with collision shapes as a virtual physics body). + Emitted when a [PhysicsBody2D] or [TileMap] enters this Area2D. Requires [member monitoring] to be set to [code]true[/code]. [TileMap]s are detected if the [TileSet] has Collision [Shape2D]s. + [code]body[/code] the [Node], if it exists in the tree, of the other [PhysicsBody2D] or [TileMap]. - Emitted when a physics body exits. - The [code]body[/code] argument can either be a [PhysicsBody2D] or a [TileMap] instance (while TileMaps are not physics body themselves, they register their tiles with collision shapes as a virtual physics body). + Emitted when a [PhysicsBody2D] or [TileMap] exits this Area2D. Requires [member monitoring] to be set to [code]true[/code]. [TileMap]s are detected if the [TileSet] has Collision [Shape2D]s. + [code]body[/code] the [Node], if it exists in the tree, of the other [PhysicsBody2D] or [TileMap]. @@ -202,8 +212,11 @@ - Emitted when a physics body enters, reporting which shapes overlapped. - The [code]body[/code] argument can either be a [PhysicsBody2D] or a [TileMap] instance (while TileMaps are not physics body themselves, they register their tiles with collision shapes as a virtual physics body). + 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 [Physics2DServer]. + [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 [Physics2DServer]. + [code]area_shape[/code] the index of the [Shape2D] of this Area2D used by the [Physics2DServer]. @@ -216,8 +229,11 @@ - Emitted when a physics body exits, reporting which shapes were overlapping. - The [code]body[/code] argument can either be a [PhysicsBody2D] or a [TileMap] instance (while TileMaps are not physics body themselves, they register their tiles with collision shapes as a virtual physics body). + 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 [Physics2DServer]. + [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 [Physics2DServer]. + [code]area_shape[/code] the index of the [Shape2D] of this Area2D used by the [Physics2DServer]. diff --git a/doc/classes/RigidBody.xml b/doc/classes/RigidBody.xml index de0e9006814f..90689c177f45 100644 --- a/doc/classes/RigidBody.xml +++ b/doc/classes/RigidBody.xml @@ -215,14 +215,16 @@ - Emitted when a body enters into contact with this one. 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. + Emitted when a collision with another [PhysicsBody] or [GridMap] occurs. 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 [Shape]s. + [code]body[/code] the [Node], if it exists in the tree, of the other [PhysicsBody] or [GridMap]. - Emitted when a body shape exits contact with this one. 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. + Emitted when the collision with another [PhysicsBody] or [GridMap] 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 [Shape]s. + [code]body[/code] the [Node], if it exists in the tree, of the other [PhysicsBody] or [GridMap]. @@ -235,8 +237,11 @@ - Emitted when a body enters into contact with this one. 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. - This signal not only receives the body that collided with this one, but also its [RID] ([code]body_id[/code]), the shape index from the colliding body ([code]body_shape[/code]), and the shape index from this body ([code]local_shape[/code]) the other body collided with. + Emitted when one of this RigidBody's [Shape]s collides with another [PhysicsBody] or [GridMap]'s [Shape]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 [Shape]s. + [code]body_id[/code] the [RID] of the other [PhysicsBody] or [MeshLibrary]'s [CollisionObject] used by the [PhysicsServer]. + [code]body[/code] the [Node], if it exists in the tree, of the other [PhysicsBody] or [GridMap]. + [code]body_shape[/code] the index of the [Shape] of the other [PhysicsBody] or [GridMap] used by the [PhysicsServer]. + [code]local_shape[/code] the index of the [Shape] of this RigidBody used by the [PhysicsServer]. [b]Note:[/b] Bullet physics cannot identify the shape index when using a [ConcavePolygonShape]. Don't use multiple [CollisionShape]s when using a [ConcavePolygonShape] with Bullet physics if you need shape indices. @@ -250,8 +255,11 @@ - Emitted when a body shape exits contact with this one. 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. - This signal not only receives the body that stopped colliding with this one, but also its [RID] ([code]body_id[/code]), the shape index from the colliding body ([code]body_shape[/code]), and the shape index from this body ([code]local_shape[/code]) the other body stopped colliding with. + Emitted when the collision between one of this RigidBody's [Shape]s and another [PhysicsBody] or [GridMap]'s [Shape]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 [Shape]s. + [code]body_id[/code] the [RID] of the other [PhysicsBody] or [MeshLibrary]'s [CollisionObject] used by the [PhysicsServer]. [GridMap]s are detected if the Meshes have [Shape]s. + [code]body[/code] the [Node], if it exists in the tree, of the other [PhysicsBody] or [GridMap]. + [code]body_shape[/code] the index of the [Shape] of the other [PhysicsBody] or [GridMap] used by the [PhysicsServer]. + [code]local_shape[/code] the index of the [Shape] of this RigidBody used by the [PhysicsServer]. [b]Note:[/b] Bullet physics cannot identify the shape index when using a [ConcavePolygonShape]. Don't use multiple [CollisionShape]s when using a [ConcavePolygonShape] with Bullet physics if you need shape indices. diff --git a/doc/classes/RigidBody2D.xml b/doc/classes/RigidBody2D.xml index 87f7c98f064a..2ee9a79464f4 100644 --- a/doc/classes/RigidBody2D.xml +++ b/doc/classes/RigidBody2D.xml @@ -191,14 +191,16 @@ - Emitted when a body enters into contact with this one. 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. + Emitted when a collision with another [PhysicsBody2D] or [TileMap] occurs. 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[/code] the [Node], if it exists in the tree, of the other [PhysicsBody2D] or [TileMap]. - Emitted when a body exits contact with this one. 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. + Emitted when the collision with another [PhysicsBody2D] or [TileMap] 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[/code] the [Node], if it exists in the tree, of the other [PhysicsBody2D] or [TileMap]. @@ -211,7 +213,11 @@ - Emitted when a body enters into contact with this one. Reports colliding shape information. See [CollisionObject2D] for shape index information. 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. + Emitted when one of this RigidBody2D'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 [Physics2DServer]. + [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 [Physics2DServer]. + [code]local_shape[/code] the index of the [Shape2D] of this RigidBody2D used by the [Physics2DServer]. @@ -224,7 +230,11 @@ - Emitted when a body shape exits contact with this one. Reports colliding shape information. See [CollisionObject2D] for shape index information. 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. + Emitted when the collision between one of this RigidBody2D'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 [Physics2DServer]. + [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 [Physics2DServer]. + [code]local_shape[/code] the index of the [Shape2D] of this RigidBody2D used by the [Physics2DServer]. From 253b1c22da8e596fbf5a229eb4cf0c9a69feea4f Mon Sep 17 00:00:00 2001 From: Marcel Admiraal Date: Sun, 11 Oct 2020 12:52:31 +0100 Subject: [PATCH 2/2] Rename the final parameter of area_shape_entered-exited local_shape. --- doc/classes/Area.xml | 16 ++++++++-------- doc/classes/Area2D.xml | 16 ++++++++-------- scene/2d/area_2d.cpp | 8 ++++---- scene/3d/area.cpp | 8 ++++---- 4 files changed, 24 insertions(+), 24 deletions(-) diff --git a/doc/classes/Area.xml b/doc/classes/Area.xml index ec164cc43cf3..e2e505b4805c 100644 --- a/doc/classes/Area.xml +++ b/doc/classes/Area.xml @@ -169,14 +169,14 @@ - + Emitted when one of another Area's [Shape]s enters one of this Area's [Shape]s. Requires [member monitoring] to be set to [code]true[/code]. [code]area_id[/code] the [RID] of the other Area's [CollisionObject] used by the [PhysicsServer]. [code]area[/code] the other Area. [code]area_shape[/code] the index of the [Shape] of the other Area used by the [PhysicsServer]. - [code]self_shape[/code] the index of the [Shape] of this Area used by the [PhysicsServer]. + [code]local_shape[/code] the index of the [Shape] of this Area used by the [PhysicsServer]. @@ -186,14 +186,14 @@ - + Emitted when one of another Area's [Shape]s enters one of this Area's [Shape]s. Requires [member monitoring] to be set to [code]true[/code]. [code]area_id[/code] the [RID] of the other Area's [CollisionObject] used by the [PhysicsServer]. [code]area[/code] the other Area. [code]area_shape[/code] the index of the [Shape] of the other Area used by the [PhysicsServer]. - [code]self_shape[/code] the index of the [Shape] of this Area used by the [PhysicsServer]. + [code]local_shape[/code] the index of the [Shape] of this Area used by the [PhysicsServer]. @@ -219,14 +219,14 @@ - + Emitted when one of a [PhysicsBody] or [GridMap]'s [Shape]s enters one of this Area's [Shape]s. Requires [member monitoring] to be set to [code]true[/code]. [GridMap]s are detected if the [MeshLibrary] has Collision [Shape]s. [code]body_id[/code] the [RID] of the [PhysicsBody] or [MeshLibrary]'s [CollisionObject] used by the [PhysicsServer]. [code]body[/code] the [Node], if it exists in the tree, of the [PhysicsBody] or [GridMap]. [code]body_shape[/code] the index of the [Shape] of the [PhysicsBody] or [GridMap] used by the [PhysicsServer]. - [code]area_shape[/code] the index of the [Shape] of this Area used by the [PhysicsServer]. + [code]local_shape[/code] the index of the [Shape] of this Area used by the [PhysicsServer]. @@ -236,14 +236,14 @@ - + Emitted when one of a [PhysicsBody] or [GridMap]'s [Shape]s enters one of this Area's [Shape]s. Requires [member monitoring] to be set to [code]true[/code]. [GridMap]s are detected if the [MeshLibrary] has Collision [Shape]s. [code]body_id[/code] the [RID] of the [PhysicsBody] or [MeshLibrary]'s [CollisionObject] used by the [PhysicsServer]. [code]body[/code] the [Node], if it exists in the tree, of the [PhysicsBody] or [GridMap]. [code]body_shape[/code] the index of the [Shape] of the [PhysicsBody] or [GridMap] used by the [PhysicsServer]. - [code]area_shape[/code] the index of the [Shape] of this Area used by the [PhysicsServer]. + [code]local_shape[/code] the index of the [Shape] of this Area used by the [PhysicsServer]. diff --git a/doc/classes/Area2D.xml b/doc/classes/Area2D.xml index 40ae6b97d4d4..520b55fcda35 100644 --- a/doc/classes/Area2D.xml +++ b/doc/classes/Area2D.xml @@ -159,14 +159,14 @@ - + 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 [Physics2DServer]. [code]area[/code] the other Area2D. [code]area_shape[/code] the index of the [Shape2D] of the other Area2D used by the [Physics2DServer]. - [code]self_shape[/code] the index of the [Shape2D] of this Area2D used by the [Physics2DServer]. + [code]local_shape[/code] the index of the [Shape2D] of this Area2D used by the [Physics2DServer]. @@ -176,14 +176,14 @@ - + 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 [Physics2DServer]. [code]area[/code] the other Area2D. [code]area_shape[/code] the index of the [Shape2D] of the other Area2D used by the [Physics2DServer]. - [code]self_shape[/code] the index of the [Shape2D] of this Area2D used by the [Physics2DServer]. + [code]local_shape[/code] the index of the [Shape2D] of this Area2D used by the [Physics2DServer]. @@ -209,14 +209,14 @@ - + 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 [Physics2DServer]. [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 [Physics2DServer]. - [code]area_shape[/code] the index of the [Shape2D] of this Area2D used by the [Physics2DServer]. + [code]local_shape[/code] the index of the [Shape2D] of this Area2D used by the [Physics2DServer]. @@ -226,14 +226,14 @@ - + 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 [Physics2DServer]. [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 [Physics2DServer]. - [code]area_shape[/code] the index of the [Shape2D] of this Area2D used by the [Physics2DServer]. + [code]local_shape[/code] the index of the [Shape2D] of this Area2D used by the [Physics2DServer]. diff --git a/scene/2d/area_2d.cpp b/scene/2d/area_2d.cpp index 7c64c5bb57ff..7cf41ca5b11d 100644 --- a/scene/2d/area_2d.cpp +++ b/scene/2d/area_2d.cpp @@ -636,13 +636,13 @@ void Area2D::_bind_methods() { ClassDB::bind_method(D_METHOD("_body_inout"), &Area2D::_body_inout); ClassDB::bind_method(D_METHOD("_area_inout"), &Area2D::_area_inout); - ADD_SIGNAL(MethodInfo("body_shape_entered", PropertyInfo(Variant::INT, "body_id"), PropertyInfo(Variant::OBJECT, "body", PROPERTY_HINT_RESOURCE_TYPE, "Node"), PropertyInfo(Variant::INT, "body_shape"), PropertyInfo(Variant::INT, "area_shape"))); - ADD_SIGNAL(MethodInfo("body_shape_exited", PropertyInfo(Variant::INT, "body_id"), PropertyInfo(Variant::OBJECT, "body", PROPERTY_HINT_RESOURCE_TYPE, "Node"), PropertyInfo(Variant::INT, "body_shape"), PropertyInfo(Variant::INT, "area_shape"))); + ADD_SIGNAL(MethodInfo("body_shape_entered", PropertyInfo(Variant::INT, "body_id"), PropertyInfo(Variant::OBJECT, "body", PROPERTY_HINT_RESOURCE_TYPE, "Node"), PropertyInfo(Variant::INT, "body_shape"), PropertyInfo(Variant::INT, "local_shape"))); + ADD_SIGNAL(MethodInfo("body_shape_exited", PropertyInfo(Variant::INT, "body_id"), PropertyInfo(Variant::OBJECT, "body", PROPERTY_HINT_RESOURCE_TYPE, "Node"), PropertyInfo(Variant::INT, "body_shape"), PropertyInfo(Variant::INT, "local_shape"))); ADD_SIGNAL(MethodInfo("body_entered", PropertyInfo(Variant::OBJECT, "body", PROPERTY_HINT_RESOURCE_TYPE, "Node"))); ADD_SIGNAL(MethodInfo("body_exited", PropertyInfo(Variant::OBJECT, "body", PROPERTY_HINT_RESOURCE_TYPE, "Node"))); - ADD_SIGNAL(MethodInfo("area_shape_entered", PropertyInfo(Variant::INT, "area_id"), PropertyInfo(Variant::OBJECT, "area", PROPERTY_HINT_RESOURCE_TYPE, "Area2D"), PropertyInfo(Variant::INT, "area_shape"), PropertyInfo(Variant::INT, "self_shape"))); - ADD_SIGNAL(MethodInfo("area_shape_exited", PropertyInfo(Variant::INT, "area_id"), PropertyInfo(Variant::OBJECT, "area", PROPERTY_HINT_RESOURCE_TYPE, "Area2D"), PropertyInfo(Variant::INT, "area_shape"), PropertyInfo(Variant::INT, "self_shape"))); + ADD_SIGNAL(MethodInfo("area_shape_entered", PropertyInfo(Variant::INT, "area_id"), PropertyInfo(Variant::OBJECT, "area", PROPERTY_HINT_RESOURCE_TYPE, "Area2D"), PropertyInfo(Variant::INT, "area_shape"), PropertyInfo(Variant::INT, "local_shape"))); + ADD_SIGNAL(MethodInfo("area_shape_exited", PropertyInfo(Variant::INT, "area_id"), PropertyInfo(Variant::OBJECT, "area", PROPERTY_HINT_RESOURCE_TYPE, "Area2D"), PropertyInfo(Variant::INT, "area_shape"), PropertyInfo(Variant::INT, "local_shape"))); ADD_SIGNAL(MethodInfo("area_entered", PropertyInfo(Variant::OBJECT, "area", PROPERTY_HINT_RESOURCE_TYPE, "Area2D"))); ADD_SIGNAL(MethodInfo("area_exited", PropertyInfo(Variant::OBJECT, "area", PROPERTY_HINT_RESOURCE_TYPE, "Area2D"))); diff --git a/scene/3d/area.cpp b/scene/3d/area.cpp index c62a735d9ab8..ac4f40431ded 100644 --- a/scene/3d/area.cpp +++ b/scene/3d/area.cpp @@ -682,13 +682,13 @@ void Area::_bind_methods() { ClassDB::bind_method(D_METHOD("set_reverb_uniformity", "amount"), &Area::set_reverb_uniformity); ClassDB::bind_method(D_METHOD("get_reverb_uniformity"), &Area::get_reverb_uniformity); - ADD_SIGNAL(MethodInfo("body_shape_entered", PropertyInfo(Variant::INT, "body_id"), PropertyInfo(Variant::OBJECT, "body", PROPERTY_HINT_RESOURCE_TYPE, "Node"), PropertyInfo(Variant::INT, "body_shape"), PropertyInfo(Variant::INT, "area_shape"))); - ADD_SIGNAL(MethodInfo("body_shape_exited", PropertyInfo(Variant::INT, "body_id"), PropertyInfo(Variant::OBJECT, "body", PROPERTY_HINT_RESOURCE_TYPE, "Node"), PropertyInfo(Variant::INT, "body_shape"), PropertyInfo(Variant::INT, "area_shape"))); + ADD_SIGNAL(MethodInfo("body_shape_entered", PropertyInfo(Variant::INT, "body_id"), PropertyInfo(Variant::OBJECT, "body", PROPERTY_HINT_RESOURCE_TYPE, "Node"), PropertyInfo(Variant::INT, "body_shape"), PropertyInfo(Variant::INT, "local_shape"))); + ADD_SIGNAL(MethodInfo("body_shape_exited", PropertyInfo(Variant::INT, "body_id"), PropertyInfo(Variant::OBJECT, "body", PROPERTY_HINT_RESOURCE_TYPE, "Node"), PropertyInfo(Variant::INT, "body_shape"), PropertyInfo(Variant::INT, "local_shape"))); ADD_SIGNAL(MethodInfo("body_entered", PropertyInfo(Variant::OBJECT, "body", PROPERTY_HINT_RESOURCE_TYPE, "Node"))); ADD_SIGNAL(MethodInfo("body_exited", PropertyInfo(Variant::OBJECT, "body", PROPERTY_HINT_RESOURCE_TYPE, "Node"))); - ADD_SIGNAL(MethodInfo("area_shape_entered", PropertyInfo(Variant::INT, "area_id"), PropertyInfo(Variant::OBJECT, "area", PROPERTY_HINT_RESOURCE_TYPE, "Area"), PropertyInfo(Variant::INT, "area_shape"), PropertyInfo(Variant::INT, "self_shape"))); - ADD_SIGNAL(MethodInfo("area_shape_exited", PropertyInfo(Variant::INT, "area_id"), PropertyInfo(Variant::OBJECT, "area", PROPERTY_HINT_RESOURCE_TYPE, "Area"), PropertyInfo(Variant::INT, "area_shape"), PropertyInfo(Variant::INT, "self_shape"))); + ADD_SIGNAL(MethodInfo("area_shape_entered", PropertyInfo(Variant::INT, "area_id"), PropertyInfo(Variant::OBJECT, "area", PROPERTY_HINT_RESOURCE_TYPE, "Area"), PropertyInfo(Variant::INT, "area_shape"), PropertyInfo(Variant::INT, "local_shape"))); + ADD_SIGNAL(MethodInfo("area_shape_exited", PropertyInfo(Variant::INT, "area_id"), PropertyInfo(Variant::OBJECT, "area", PROPERTY_HINT_RESOURCE_TYPE, "Area"), PropertyInfo(Variant::INT, "area_shape"), PropertyInfo(Variant::INT, "local_shape"))); ADD_SIGNAL(MethodInfo("area_entered", PropertyInfo(Variant::OBJECT, "area", PROPERTY_HINT_RESOURCE_TYPE, "Area"))); ADD_SIGNAL(MethodInfo("area_exited", PropertyInfo(Variant::OBJECT, "area", PROPERTY_HINT_RESOURCE_TYPE, "Area")));