diff options
Diffstat (limited to 'doc/classes/CollisionObject2D.xml')
-rw-r--r-- | doc/classes/CollisionObject2D.xml | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/doc/classes/CollisionObject2D.xml b/doc/classes/CollisionObject2D.xml index e8f7a59e4c..e18970d84f 100644 --- a/doc/classes/CollisionObject2D.xml +++ b/doc/classes/CollisionObject2D.xml @@ -31,6 +31,24 @@ 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> + <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> + <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> @@ -90,6 +108,30 @@ Returns the [code]owner_id[/code] of the given shape. </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> + <description> + If [code]value[/value] is [code]true[/code], sets the specified [code]bit[/code] in the the [member collision_layer]. + If [code]value[/value] 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> + <description> + If [code]value[/value] is [code]true[/code], sets the specified [code]bit[/code] in the the [member collision_mask]. + If [code]value[/value] is [code]false[/code], clears the specified [code]bit[/code] in the the [member collision_mask]. + </description> + </method> <method name="shape_owner_add_shape"> <return type="void"> </return> @@ -216,6 +258,14 @@ </method> </methods> <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. + </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. + </member> <member name="input_pickable" type="bool" setter="set_pickable" getter="is_pickable" default="true"> If [code]true[/code], this object is pickable. A pickable object can detect the mouse pointer entering/leaving, and if the mouse is inside it, report input events. Requires at least one [code]collision_layer[/code] bit to be set. </member> |