diff options
author | RĂ©mi Verschelde <remi@verschelde.fr> | 2021-04-20 21:07:32 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-04-20 21:07:32 +0200 |
commit | b06116d62ff514a6b03247660ddcccff78ccd0e3 (patch) | |
tree | cc9b6936918727a2edb95d878f0d537b419b9755 /doc/classes/CollisionObject3D.xml | |
parent | c395b9c4ac5f1c279a0e8ee471e7d26cd48a0adb (diff) | |
parent | 071871b787684d03fd924f69603107860c8bdb99 (diff) |
Merge pull request #42770 from madmiraal/fix-26680
Move collision layer and mask into CollisionObject.
Diffstat (limited to 'doc/classes/CollisionObject3D.xml')
-rw-r--r-- | doc/classes/CollisionObject3D.xml | 53 |
1 files changed, 53 insertions, 0 deletions
diff --git a/doc/classes/CollisionObject3D.xml b/doc/classes/CollisionObject3D.xml index f8e897653d..4523a63c4c 100644 --- a/doc/classes/CollisionObject3D.xml +++ b/doc/classes/CollisionObject3D.xml @@ -35,6 +35,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> @@ -67,6 +85,30 @@ 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> + <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_find_owner" qualifiers="const"> <return type="int"> </return> @@ -180,6 +222,17 @@ </method> </methods> <members> + <member name="collision_layer" type="int" setter="set_collision_layer" getter="get_collision_layer" default="1"> + The physics layers this CollisionObject3D 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 CollisionObject3D 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> <member name="input_capture_on_drag" type="bool" setter="set_capture_input_on_drag" getter="get_capture_input_on_drag" default="false"> If [code]true[/code], the [CollisionObject3D] will continue to receive input events as the mouse is dragged across its shapes. </member> |