summaryrefslogtreecommitdiff
path: root/doc/classes/CollisionObject2D.xml
diff options
context:
space:
mode:
Diffstat (limited to 'doc/classes/CollisionObject2D.xml')
-rw-r--r--doc/classes/CollisionObject2D.xml199
1 files changed, 67 insertions, 132 deletions
diff --git a/doc/classes/CollisionObject2D.xml b/doc/classes/CollisionObject2D.xml
index 097bbc2de8..6bb756ea2c 100644
--- a/doc/classes/CollisionObject2D.xml
+++ b/doc/classes/CollisionObject2D.xml
@@ -10,248 +10,188 @@
</tutorials>
<methods>
<method name="_input_event" qualifiers="virtual">
- <return type="void">
- </return>
- <argument index="0" name="viewport" type="Object">
- </argument>
- <argument index="1" name="event" type="InputEvent">
- </argument>
- <argument index="2" name="shape_idx" type="int">
- </argument>
+ <return type="void" />
+ <argument index="0" name="viewport" type="Object" />
+ <argument index="1" name="event" type="InputEvent" />
+ <argument index="2" name="shape_idx" type="int" />
<description>
Accepts unhandled [InputEvent]s. Requires [member input_pickable] to be [code]true[/code]. [code]shape_idx[/code] is the child index of the clicked [Shape2D]. Connect to the [code]input_event[/code] signal to easily pick up these events.
</description>
</method>
<method name="create_shape_owner">
- <return type="int">
- </return>
- <argument index="0" name="owner" type="Object">
- </argument>
+ <return type="int" />
+ <argument index="0" name="owner" type="Object" />
<description>
Creates a new shape owner for the given object. Returns [code]owner_id[/code] of the new owner for future reference.
</description>
</method>
<method name="get_collision_layer_bit" qualifiers="const">
- <return type="bool">
- </return>
- <argument index="0" name="bit" type="int">
- </argument>
+ <return type="bool" />
+ <argument index="0" name="bit" type="int" />
<description>
Returns whether or not the specified [code]bit[/code] of the [member collision_layer] is set.
</description>
</method>
<method name="get_collision_mask_bit" qualifiers="const">
- <return type="bool">
- </return>
- <argument index="0" name="bit" type="int">
- </argument>
+ <return type="bool" />
+ <argument index="0" name="bit" type="int" />
<description>
Returns whether or not the specified [code]bit[/code] of the [member collision_mask] is set.
</description>
</method>
<method name="get_rid" qualifiers="const">
- <return type="RID">
- </return>
+ <return type="RID" />
<description>
Returns the object's [RID].
</description>
</method>
<method name="get_shape_owner_one_way_collision_margin" qualifiers="const">
- <return type="float">
- </return>
- <argument index="0" name="owner_id" type="int">
- </argument>
+ <return type="float" />
+ <argument index="0" name="owner_id" type="int" />
<description>
Returns the [code]one_way_collision_margin[/code] of the shape owner identified by given [code]owner_id[/code].
</description>
</method>
<method name="get_shape_owners">
- <return type="Array">
- </return>
+ <return type="Array" />
<description>
Returns an [Array] of [code]owner_id[/code] identifiers. You can use these ids in other methods that take [code]owner_id[/code] as an argument.
</description>
</method>
<method name="is_shape_owner_disabled" qualifiers="const">
- <return type="bool">
- </return>
- <argument index="0" name="owner_id" type="int">
- </argument>
+ <return type="bool" />
+ <argument index="0" name="owner_id" type="int" />
<description>
If [code]true[/code], the shape owner and its shapes are disabled.
</description>
</method>
<method name="is_shape_owner_one_way_collision_enabled" qualifiers="const">
- <return type="bool">
- </return>
- <argument index="0" name="owner_id" type="int">
- </argument>
+ <return type="bool" />
+ <argument index="0" name="owner_id" type="int" />
<description>
Returns [code]true[/code] if collisions for the shape owner originating from this [CollisionObject2D] will not be reported to collided with [CollisionObject2D]s.
</description>
</method>
<method name="remove_shape_owner">
- <return type="void">
- </return>
- <argument index="0" name="owner_id" type="int">
- </argument>
+ <return type="void" />
+ <argument index="0" name="owner_id" type="int" />
<description>
Removes the given shape owner.
</description>
</method>
<method name="set_collision_layer_bit">
- <return type="void">
- </return>
- <argument index="0" name="bit" type="int">
- </argument>
- <argument index="1" name="value" type="bool">
- </argument>
+ <return type="void" />
+ <argument index="0" name="bit" type="int" />
+ <argument index="1" name="value" type="bool" />
<description>
If [code]value[/code] is [code]true[/code], sets the specified [code]bit[/code] in the the [member collision_layer].
If [code]value[/code] is [code]false[/code], clears the specified [code]bit[/code] in the the [member collision_layer].
</description>
</method>
<method name="set_collision_mask_bit">
- <return type="void">
- </return>
- <argument index="0" name="bit" type="int">
- </argument>
- <argument index="1" name="value" type="bool">
- </argument>
+ <return type="void" />
+ <argument index="0" name="bit" type="int" />
+ <argument index="1" name="value" type="bool" />
<description>
If [code]value[/code] is [code]true[/code], sets the specified [code]bit[/code] in the the [member collision_mask].
If [code]value[/code] is [code]false[/code], clears the specified [code]bit[/code] in the the [member collision_mask].
</description>
</method>
<method name="shape_find_owner" qualifiers="const">
- <return type="int">
- </return>
- <argument index="0" name="shape_index" type="int">
- </argument>
+ <return type="int" />
+ <argument index="0" name="shape_index" type="int" />
<description>
Returns the [code]owner_id[/code] of the given shape.
</description>
</method>
<method name="shape_owner_add_shape">
- <return type="void">
- </return>
- <argument index="0" name="owner_id" type="int">
- </argument>
- <argument index="1" name="shape" type="Shape2D">
- </argument>
+ <return type="void" />
+ <argument index="0" name="owner_id" type="int" />
+ <argument index="1" name="shape" type="Shape2D" />
<description>
Adds a [Shape2D] to the shape owner.
</description>
</method>
<method name="shape_owner_clear_shapes">
- <return type="void">
- </return>
- <argument index="0" name="owner_id" type="int">
- </argument>
+ <return type="void" />
+ <argument index="0" name="owner_id" type="int" />
<description>
Removes all shapes from the shape owner.
</description>
</method>
<method name="shape_owner_get_owner" qualifiers="const">
- <return type="Object">
- </return>
- <argument index="0" name="owner_id" type="int">
- </argument>
+ <return type="Object" />
+ <argument index="0" name="owner_id" type="int" />
<description>
Returns the parent object of the given shape owner.
</description>
</method>
<method name="shape_owner_get_shape" qualifiers="const">
- <return type="Shape2D">
- </return>
- <argument index="0" name="owner_id" type="int">
- </argument>
- <argument index="1" name="shape_id" type="int">
- </argument>
+ <return type="Shape2D" />
+ <argument index="0" name="owner_id" type="int" />
+ <argument index="1" name="shape_id" type="int" />
<description>
Returns the [Shape2D] with the given id from the given shape owner.
</description>
</method>
<method name="shape_owner_get_shape_count" qualifiers="const">
- <return type="int">
- </return>
- <argument index="0" name="owner_id" type="int">
- </argument>
+ <return type="int" />
+ <argument index="0" name="owner_id" type="int" />
<description>
Returns the number of shapes the given shape owner contains.
</description>
</method>
<method name="shape_owner_get_shape_index" qualifiers="const">
- <return type="int">
- </return>
- <argument index="0" name="owner_id" type="int">
- </argument>
- <argument index="1" name="shape_id" type="int">
- </argument>
+ <return type="int" />
+ <argument index="0" name="owner_id" type="int" />
+ <argument index="1" name="shape_id" type="int" />
<description>
Returns the child index of the [Shape2D] with the given id from the given shape owner.
</description>
</method>
<method name="shape_owner_get_transform" qualifiers="const">
- <return type="Transform2D">
- </return>
- <argument index="0" name="owner_id" type="int">
- </argument>
+ <return type="Transform2D" />
+ <argument index="0" name="owner_id" type="int" />
<description>
Returns the shape owner's [Transform2D].
</description>
</method>
<method name="shape_owner_remove_shape">
- <return type="void">
- </return>
- <argument index="0" name="owner_id" type="int">
- </argument>
- <argument index="1" name="shape_id" type="int">
- </argument>
+ <return type="void" />
+ <argument index="0" name="owner_id" type="int" />
+ <argument index="1" name="shape_id" type="int" />
<description>
Removes a shape from the given shape owner.
</description>
</method>
<method name="shape_owner_set_disabled">
- <return type="void">
- </return>
- <argument index="0" name="owner_id" type="int">
- </argument>
- <argument index="1" name="disabled" type="bool">
- </argument>
+ <return type="void" />
+ <argument index="0" name="owner_id" type="int" />
+ <argument index="1" name="disabled" type="bool" />
<description>
If [code]true[/code], disables the given shape owner.
</description>
</method>
<method name="shape_owner_set_one_way_collision">
- <return type="void">
- </return>
- <argument index="0" name="owner_id" type="int">
- </argument>
- <argument index="1" name="enable" type="bool">
- </argument>
+ <return type="void" />
+ <argument index="0" name="owner_id" type="int" />
+ <argument index="1" name="enable" type="bool" />
<description>
If [code]enable[/code] is [code]true[/code], collisions for the shape owner originating from this [CollisionObject2D] will not be reported to collided with [CollisionObject2D]s.
</description>
</method>
<method name="shape_owner_set_one_way_collision_margin">
- <return type="void">
- </return>
- <argument index="0" name="owner_id" type="int">
- </argument>
- <argument index="1" name="margin" type="float">
- </argument>
+ <return type="void" />
+ <argument index="0" name="owner_id" type="int" />
+ <argument index="1" name="margin" type="float" />
<description>
Sets the [code]one_way_collision_margin[/code] of the shape owner identified by given [code]owner_id[/code] to [code]margin[/code] pixels.
</description>
</method>
<method name="shape_owner_set_transform">
- <return type="void">
- </return>
- <argument index="0" name="owner_id" type="int">
- </argument>
- <argument index="1" name="transform" type="Transform2D">
- </argument>
+ <return type="void" />
+ <argument index="0" name="owner_id" type="int" />
+ <argument index="1" name="transform" type="Transform2D" />
<description>
Sets the [Transform2D] of the given shape owner.
</description>
@@ -260,11 +200,11 @@
<members>
<member name="collision_layer" type="int" setter="set_collision_layer" getter="get_collision_layer" default="1">
The physics layers this CollisionObject2D is in. Collision objects can exist in one or more of 32 different layers. See also [member collision_mask].
- [b]Note:[/b] A contact is detected if object A is in any of the layers that object B scans, or object B is in any layers that object A scans. See [url=https://docs.godotengine.org/en/latest/tutorials/physics/physics_introduction.html#collision-layers-and-masks]Collision layers and masks[/url] in the documentation for more information.
+ [b]Note:[/b] Object A can detect a contact with object B only if object B is in any of the layers that object A scans. See [url=https://docs.godotengine.org/en/latest/tutorials/physics/physics_introduction.html#collision-layers-and-masks]Collision layers and masks[/url] in the documentation for more information.
</member>
<member name="collision_mask" type="int" setter="set_collision_mask" getter="get_collision_mask" default="1">
The physics layers this CollisionObject2D scans. Collision objects can scan one or more of 32 different layers. See also [member collision_layer].
- [b]Note:[/b] A contact is detected if object A is in any of the layers that object B scans, or object B is in any layers that object A scans. See [url=https://docs.godotengine.org/en/latest/tutorials/physics/physics_introduction.html#collision-layers-and-masks]Collision layers and masks[/url] in the documentation for more information.
+ [b]Note:[/b] Object A can detect a contact with object B only if object B is in any of the layers that object A scans. See [url=https://docs.godotengine.org/en/latest/tutorials/physics/physics_introduction.html#collision-layers-and-masks]Collision layers and masks[/url] in the documentation for more information.
</member>
<member name="disable_mode" type="int" setter="set_disable_mode" getter="get_disable_mode" enum="CollisionObject2D.DisableMode" default="0">
Defines the behavior in physics when [member Node.process_mode] is set to [constant Node.PROCESS_MODE_DISABLED]. See [enum DisableMode] for more details about the different modes.
@@ -275,12 +215,9 @@
</members>
<signals>
<signal name="input_event">
- <argument index="0" name="viewport" type="Node">
- </argument>
- <argument index="1" name="event" type="InputEvent">
- </argument>
- <argument index="2" name="shape_idx" type="int">
- </argument>
+ <argument index="0" name="viewport" type="Node" />
+ <argument index="1" name="event" type="InputEvent" />
+ <argument index="2" name="shape_idx" type="int" />
<description>
Emitted when an input event occurs. Requires [member input_pickable] to be [code]true[/code] and at least one [code]collision_layer[/code] bit to be set. See [method _input_event] for details.
</description>
@@ -296,15 +233,13 @@
</description>
</signal>
<signal name="mouse_shape_entered">
- <argument index="0" name="shape_idx" type="int">
- </argument>
+ <argument index="0" name="shape_idx" type="int" />
<description>
Emitted when the mouse pointer enters any of this object's shapes or moves from one shape to another. [code]shape_idx[/code] is the child index of the newly entered [Shape2D]. Requires [member input_pickable] to be [code]true[/code] and at least one [member collision_layer] bit to be set.
</description>
</signal>
<signal name="mouse_shape_exited">
- <argument index="0" name="shape_idx" type="int">
- </argument>
+ <argument index="0" name="shape_idx" type="int" />
<description>
Emitted when the mouse pointer exits any of this object's shapes. [code]shape_idx[/code] is the child index of the exited [Shape2D]. Requires [member input_pickable] to be [code]true[/code] and at least one [member collision_layer] bit to be set.
</description>