diff options
Diffstat (limited to 'doc/classes/CollisionObject3D.xml')
-rw-r--r-- | doc/classes/CollisionObject3D.xml | 219 |
1 files changed, 87 insertions, 132 deletions
diff --git a/doc/classes/CollisionObject3D.xml b/doc/classes/CollisionObject3D.xml index 522eec5cbe..19bcdcbb27 100644 --- a/doc/classes/CollisionObject3D.xml +++ b/doc/classes/CollisionObject3D.xml @@ -10,225 +10,174 @@ </tutorials> <methods> <method name="_input_event" qualifiers="virtual"> - <return type="void"> - </return> - <argument index="0" name="camera" type="Object"> - </argument> - <argument index="1" name="event" type="InputEvent"> - </argument> - <argument index="2" name="click_position" type="Vector3"> - </argument> - <argument index="3" name="click_normal" type="Vector3"> - </argument> - <argument index="4" name="shape_idx" type="int"> - </argument> + <return type="void" /> + <argument index="0" name="camera" type="Camera3D" /> + <argument index="1" name="event" type="InputEvent" /> + <argument index="2" name="position" type="Vector3" /> + <argument index="3" name="normal" type="Vector3" /> + <argument index="4" name="shape_idx" type="int" /> <description> - Accepts unhandled [InputEvent]s. [code]click_position[/code] is the clicked location in world space and [code]click_normal[/code] is the normal vector extending from the clicked surface of the [Shape3D] at [code]shape_idx[/code]. Connect to the [code]input_event[/code] signal to easily pick up these events. + Receives unhandled [InputEvent]s. [code]position[/code] is the location in world space of the mouse pointer on the surface of the shape with index [code]shape_idx[/code] and [code]normal[/code] is the normal vector of the surface at that point. Connect to the [signal input_event] 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> + <method name="get_collision_layer_value" qualifiers="const"> + <return type="bool" /> + <argument index="0" name="layer_number" type="int" /> <description> - Returns whether or not the specified [code]bit[/code] of the [member collision_layer] is set. + Returns whether or not the specified layer of the [member collision_layer] is enabled, given a [code]layer_number[/code] between 1 and 32. </description> </method> - <method name="get_collision_mask_bit" qualifiers="const"> - <return type="bool"> - </return> - <argument index="0" name="bit" type="int"> - </argument> + <method name="get_collision_mask_value" qualifiers="const"> + <return type="bool" /> + <argument index="0" name="layer_number" type="int" /> <description> - Returns whether or not the specified [code]bit[/code] of the [member collision_mask] is set. + Returns whether or not the specified layer of the [member collision_mask] is enabled, given a [code]layer_number[/code] between 1 and 32. </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_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="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> + <method name="set_collision_layer_value"> + <return type="void" /> + <argument index="0" name="layer_number" type="int" /> + <argument index="1" name="value" type="bool" /> <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]. + Based on [code]value[/code], enables or disables the specified layer in the [member collision_layer], given a [code]layer_number[/code] between 1 and 32. </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> + <method name="set_collision_mask_value"> + <return type="void" /> + <argument index="0" name="layer_number" type="int" /> + <argument index="1" name="value" type="bool" /> <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]. + Based on [code]value[/code], enables or disables the specified layer in the [member collision_mask], given a [code]layer_number[/code] between 1 and 32. </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="Shape3D"> - </argument> + <return type="void" /> + <argument index="0" name="owner_id" type="int" /> + <argument index="1" name="shape" type="Shape3D" /> <description> Adds a [Shape3D] 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="Shape3D"> - </return> - <argument index="0" name="owner_id" type="int"> - </argument> - <argument index="1" name="shape_id" type="int"> - </argument> + <return type="Shape3D" /> + <argument index="0" name="owner_id" type="int" /> + <argument index="1" name="shape_id" type="int" /> <description> Returns the [Shape3D] 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 [Shape3D] with the given id from the given shape owner. </description> </method> <method name="shape_owner_get_transform" qualifiers="const"> - <return type="Transform"> - </return> - <argument index="0" name="owner_id" type="int"> - </argument> + <return type="Transform3D" /> + <argument index="0" name="owner_id" type="int" /> <description> - Returns the shape owner's [Transform]. + Returns the shape owner's [Transform3D]. </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_transform"> - <return type="void"> - </return> - <argument index="0" name="owner_id" type="int"> - </argument> - <argument index="1" name="transform" type="Transform"> - </argument> + <return type="void" /> + <argument index="0" name="owner_id" type="int" /> + <argument index="1" name="transform" type="Transform3D" /> <description> - Sets the [Transform] of the given shape owner. + Sets the [Transform3D] of the given shape owner. </description> </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. + The physics layers this CollisionObject3D [b]is in[/b]. Collision objects can exist in one or more of 32 different layers. See also [member collision_mask]. + [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 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. + The physics layers this CollisionObject3D [b]scans[/b]. Collision objects can scan one or more of 32 different layers. See also [member collision_layer]. + [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="CollisionObject3D.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. </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. @@ -239,18 +188,13 @@ </members> <signals> <signal name="input_event"> - <argument index="0" name="camera" type="Node"> - </argument> - <argument index="1" name="event" type="InputEvent"> - </argument> - <argument index="2" name="click_position" type="Vector3"> - </argument> - <argument index="3" name="click_normal" type="Vector3"> - </argument> - <argument index="4" name="shape_idx" type="int"> - </argument> + <argument index="0" name="camera" type="Node" /> + <argument index="1" name="event" type="InputEvent" /> + <argument index="2" name="position" type="Vector3" /> + <argument index="3" name="normal" type="Vector3" /> + <argument index="4" name="shape_idx" type="int" /> <description> - Emitted when [method _input_event] receives an event. See its description for details. + Emitted when the object receives an unhandled [InputEvent]. [code]position[/code] is the location in world space of the mouse pointer on the surface of the shape with index [code]shape_idx[/code] and [code]normal[/code] is the normal vector of the surface at that point. </description> </signal> <signal name="mouse_entered"> @@ -265,5 +209,16 @@ </signal> </signals> <constants> + <constant name="DISABLE_MODE_REMOVE" value="0" enum="DisableMode"> + When [member Node.process_mode] is set to [constant Node.PROCESS_MODE_DISABLED], remove from the physics simulation to stop all physics interactions with this [CollisionObject3D]. + Automatically re-added to the physics simulation when the [Node] is processed again. + </constant> + <constant name="DISABLE_MODE_MAKE_STATIC" value="1" enum="DisableMode"> + When [member Node.process_mode] is set to [constant Node.PROCESS_MODE_DISABLED], make the body static. Doesn't affect [Area2D]. [PhysicsBody3D] can't be affected by forces or other bodies while static. + Automatically set [PhysicsBody3D] back to its original mode when the [Node] is processed again. + </constant> + <constant name="DISABLE_MODE_KEEP_ACTIVE" value="2" enum="DisableMode"> + When [member Node.process_mode] is set to [constant Node.PROCESS_MODE_DISABLED], do not affect the physics simulation. + </constant> </constants> </class> |