481 lines
27 KiB
Text
481 lines
27 KiB
Text
|
:github_url: hide
|
||
|
|
||
|
.. DO NOT EDIT THIS FILE!!!
|
||
|
.. Generated automatically from Godot engine sources.
|
||
|
.. Generator: https://github.com/godotengine/godot/tree/3.6/doc/tools/make_rst.py.
|
||
|
.. XML source: https://github.com/godotengine/godot/tree/3.6/doc/classes/CollisionObject.xml.
|
||
|
|
||
|
.. _class_CollisionObject:
|
||
|
|
||
|
CollisionObject
|
||
|
===============
|
||
|
|
||
|
**Inherits:** :ref:`Spatial<class_Spatial>` **<** :ref:`Node<class_Node>` **<** :ref:`Object<class_Object>`
|
||
|
|
||
|
**Inherited By:** :ref:`Area<class_Area>`, :ref:`PhysicsBody<class_PhysicsBody>`
|
||
|
|
||
|
Base node for collision objects.
|
||
|
|
||
|
.. rst-class:: classref-introduction-group
|
||
|
|
||
|
Description
|
||
|
-----------
|
||
|
|
||
|
CollisionObject is the base class for physics objects. It can hold any number of collision :ref:`Shape<class_Shape>`\ s. Each shape must be assigned to a *shape owner*. The CollisionObject can have any number of shape owners. Shape owners are not nodes and do not appear in the editor, but are accessible through code using the ``shape_owner_*`` methods.
|
||
|
|
||
|
\ **Warning:** With a non-uniform scale this node will probably not function as expected. Please make sure to keep its scale uniform (i.e. the same on all axes), and change the size(s) of its collision shape(s) instead.
|
||
|
|
||
|
.. rst-class:: classref-reftable-group
|
||
|
|
||
|
Properties
|
||
|
----------
|
||
|
|
||
|
.. table::
|
||
|
:widths: auto
|
||
|
|
||
|
+-------------------------+------------------------------------------------------------------------------------+-----------+
|
||
|
| :ref:`int<class_int>` | :ref:`collision_layer<class_CollisionObject_property_collision_layer>` | ``1`` |
|
||
|
+-------------------------+------------------------------------------------------------------------------------+-----------+
|
||
|
| :ref:`int<class_int>` | :ref:`collision_mask<class_CollisionObject_property_collision_mask>` | ``1`` |
|
||
|
+-------------------------+------------------------------------------------------------------------------------+-----------+
|
||
|
| :ref:`bool<class_bool>` | :ref:`input_capture_on_drag<class_CollisionObject_property_input_capture_on_drag>` | ``false`` |
|
||
|
+-------------------------+------------------------------------------------------------------------------------+-----------+
|
||
|
| :ref:`bool<class_bool>` | :ref:`input_ray_pickable<class_CollisionObject_property_input_ray_pickable>` | ``true`` |
|
||
|
+-------------------------+------------------------------------------------------------------------------------+-----------+
|
||
|
|
||
|
.. rst-class:: classref-reftable-group
|
||
|
|
||
|
Methods
|
||
|
-------
|
||
|
|
||
|
.. table::
|
||
|
:widths: auto
|
||
|
|
||
|
+-----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
|
| void | :ref:`_input_event<class_CollisionObject_method__input_event>` **(** :ref:`Object<class_Object>` camera, :ref:`InputEvent<class_InputEvent>` event, :ref:`Vector3<class_Vector3>` position, :ref:`Vector3<class_Vector3>` normal, :ref:`int<class_int>` shape_idx **)** |virtual| |
|
||
|
+-----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
|
| :ref:`int<class_int>` | :ref:`create_shape_owner<class_CollisionObject_method_create_shape_owner>` **(** :ref:`Object<class_Object>` owner **)** |
|
||
|
+-----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
|
| :ref:`bool<class_bool>` | :ref:`get_collision_layer_bit<class_CollisionObject_method_get_collision_layer_bit>` **(** :ref:`int<class_int>` bit **)** |const| |
|
||
|
+-----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
|
| :ref:`bool<class_bool>` | :ref:`get_collision_mask_bit<class_CollisionObject_method_get_collision_mask_bit>` **(** :ref:`int<class_int>` bit **)** |const| |
|
||
|
+-----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
|
| :ref:`RID<class_RID>` | :ref:`get_rid<class_CollisionObject_method_get_rid>` **(** **)** |const| |
|
||
|
+-----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
|
| :ref:`Array<class_Array>` | :ref:`get_shape_owners<class_CollisionObject_method_get_shape_owners>` **(** **)** |
|
||
|
+-----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
|
| :ref:`bool<class_bool>` | :ref:`is_shape_owner_disabled<class_CollisionObject_method_is_shape_owner_disabled>` **(** :ref:`int<class_int>` owner_id **)** |const| |
|
||
|
+-----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
|
| void | :ref:`remove_shape_owner<class_CollisionObject_method_remove_shape_owner>` **(** :ref:`int<class_int>` owner_id **)** |
|
||
|
+-----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
|
| void | :ref:`set_collision_layer_bit<class_CollisionObject_method_set_collision_layer_bit>` **(** :ref:`int<class_int>` bit, :ref:`bool<class_bool>` value **)** |
|
||
|
+-----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
|
| void | :ref:`set_collision_mask_bit<class_CollisionObject_method_set_collision_mask_bit>` **(** :ref:`int<class_int>` bit, :ref:`bool<class_bool>` value **)** |
|
||
|
+-----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
|
| :ref:`int<class_int>` | :ref:`shape_find_owner<class_CollisionObject_method_shape_find_owner>` **(** :ref:`int<class_int>` shape_index **)** |const| |
|
||
|
+-----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
|
| void | :ref:`shape_owner_add_shape<class_CollisionObject_method_shape_owner_add_shape>` **(** :ref:`int<class_int>` owner_id, :ref:`Shape<class_Shape>` shape **)** |
|
||
|
+-----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
|
| void | :ref:`shape_owner_clear_shapes<class_CollisionObject_method_shape_owner_clear_shapes>` **(** :ref:`int<class_int>` owner_id **)** |
|
||
|
+-----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
|
| :ref:`Object<class_Object>` | :ref:`shape_owner_get_owner<class_CollisionObject_method_shape_owner_get_owner>` **(** :ref:`int<class_int>` owner_id **)** |const| |
|
||
|
+-----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
|
| :ref:`Shape<class_Shape>` | :ref:`shape_owner_get_shape<class_CollisionObject_method_shape_owner_get_shape>` **(** :ref:`int<class_int>` owner_id, :ref:`int<class_int>` shape_id **)** |const| |
|
||
|
+-----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
|
| :ref:`int<class_int>` | :ref:`shape_owner_get_shape_count<class_CollisionObject_method_shape_owner_get_shape_count>` **(** :ref:`int<class_int>` owner_id **)** |const| |
|
||
|
+-----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
|
| :ref:`int<class_int>` | :ref:`shape_owner_get_shape_index<class_CollisionObject_method_shape_owner_get_shape_index>` **(** :ref:`int<class_int>` owner_id, :ref:`int<class_int>` shape_id **)** |const| |
|
||
|
+-----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
|
| :ref:`Transform<class_Transform>` | :ref:`shape_owner_get_transform<class_CollisionObject_method_shape_owner_get_transform>` **(** :ref:`int<class_int>` owner_id **)** |const| |
|
||
|
+-----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
|
| void | :ref:`shape_owner_remove_shape<class_CollisionObject_method_shape_owner_remove_shape>` **(** :ref:`int<class_int>` owner_id, :ref:`int<class_int>` shape_id **)** |
|
||
|
+-----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
|
| void | :ref:`shape_owner_set_disabled<class_CollisionObject_method_shape_owner_set_disabled>` **(** :ref:`int<class_int>` owner_id, :ref:`bool<class_bool>` disabled **)** |
|
||
|
+-----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
|
| void | :ref:`shape_owner_set_transform<class_CollisionObject_method_shape_owner_set_transform>` **(** :ref:`int<class_int>` owner_id, :ref:`Transform<class_Transform>` transform **)** |
|
||
|
+-----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
|
|
||
|
.. rst-class:: classref-section-separator
|
||
|
|
||
|
----
|
||
|
|
||
|
.. rst-class:: classref-descriptions-group
|
||
|
|
||
|
Signals
|
||
|
-------
|
||
|
|
||
|
.. _class_CollisionObject_signal_input_event:
|
||
|
|
||
|
.. rst-class:: classref-signal
|
||
|
|
||
|
**input_event** **(** :ref:`Node<class_Node>` camera, :ref:`InputEvent<class_InputEvent>` event, :ref:`Vector3<class_Vector3>` position, :ref:`Vector3<class_Vector3>` normal, :ref:`int<class_int>` shape_idx **)**
|
||
|
|
||
|
Emitted when the object receives an unhandled :ref:`InputEvent<class_InputEvent>`. ``position`` is the location in world space of the mouse pointer on the surface of the shape with index ``shape_idx`` and ``normal`` is the normal vector of the surface at that point.
|
||
|
|
||
|
.. rst-class:: classref-item-separator
|
||
|
|
||
|
----
|
||
|
|
||
|
.. _class_CollisionObject_signal_mouse_entered:
|
||
|
|
||
|
.. rst-class:: classref-signal
|
||
|
|
||
|
**mouse_entered** **(** **)**
|
||
|
|
||
|
Emitted when the mouse pointer enters any of this object's shapes.
|
||
|
|
||
|
.. rst-class:: classref-item-separator
|
||
|
|
||
|
----
|
||
|
|
||
|
.. _class_CollisionObject_signal_mouse_exited:
|
||
|
|
||
|
.. rst-class:: classref-signal
|
||
|
|
||
|
**mouse_exited** **(** **)**
|
||
|
|
||
|
Emitted when the mouse pointer exits all this object's shapes.
|
||
|
|
||
|
.. rst-class:: classref-section-separator
|
||
|
|
||
|
----
|
||
|
|
||
|
.. rst-class:: classref-descriptions-group
|
||
|
|
||
|
Property Descriptions
|
||
|
---------------------
|
||
|
|
||
|
.. _class_CollisionObject_property_collision_layer:
|
||
|
|
||
|
.. rst-class:: classref-property
|
||
|
|
||
|
:ref:`int<class_int>` **collision_layer** = ``1``
|
||
|
|
||
|
.. rst-class:: classref-property-setget
|
||
|
|
||
|
- void **set_collision_layer** **(** :ref:`int<class_int>` value **)**
|
||
|
- :ref:`int<class_int>` **get_collision_layer** **(** **)**
|
||
|
|
||
|
The physics layers this CollisionObject3D is in. Collision objects can exist in one or more of 32 different layers. See also :ref:`collision_mask<class_CollisionObject_property_collision_mask>`.
|
||
|
|
||
|
\ **Note:** 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 `Collision layers and masks <../tutorials/physics/physics_introduction.html#collision-layers-and-masks>`__ in the documentation for more information.
|
||
|
|
||
|
.. rst-class:: classref-item-separator
|
||
|
|
||
|
----
|
||
|
|
||
|
.. _class_CollisionObject_property_collision_mask:
|
||
|
|
||
|
.. rst-class:: classref-property
|
||
|
|
||
|
:ref:`int<class_int>` **collision_mask** = ``1``
|
||
|
|
||
|
.. rst-class:: classref-property-setget
|
||
|
|
||
|
- void **set_collision_mask** **(** :ref:`int<class_int>` value **)**
|
||
|
- :ref:`int<class_int>` **get_collision_mask** **(** **)**
|
||
|
|
||
|
The physics layers this CollisionObject3D scans. Collision objects can scan one or more of 32 different layers. See also :ref:`collision_layer<class_CollisionObject_property_collision_layer>`.
|
||
|
|
||
|
\ **Note:** 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 `Collision layers and masks <../tutorials/physics/physics_introduction.html#collision-layers-and-masks>`__ in the documentation for more information.
|
||
|
|
||
|
.. rst-class:: classref-item-separator
|
||
|
|
||
|
----
|
||
|
|
||
|
.. _class_CollisionObject_property_input_capture_on_drag:
|
||
|
|
||
|
.. rst-class:: classref-property
|
||
|
|
||
|
:ref:`bool<class_bool>` **input_capture_on_drag** = ``false``
|
||
|
|
||
|
.. rst-class:: classref-property-setget
|
||
|
|
||
|
- void **set_capture_input_on_drag** **(** :ref:`bool<class_bool>` value **)**
|
||
|
- :ref:`bool<class_bool>` **get_capture_input_on_drag** **(** **)**
|
||
|
|
||
|
If ``true``, the **CollisionObject** will continue to receive input events as the mouse is dragged across its shapes.
|
||
|
|
||
|
.. rst-class:: classref-item-separator
|
||
|
|
||
|
----
|
||
|
|
||
|
.. _class_CollisionObject_property_input_ray_pickable:
|
||
|
|
||
|
.. rst-class:: classref-property
|
||
|
|
||
|
:ref:`bool<class_bool>` **input_ray_pickable** = ``true``
|
||
|
|
||
|
.. rst-class:: classref-property-setget
|
||
|
|
||
|
- void **set_ray_pickable** **(** :ref:`bool<class_bool>` value **)**
|
||
|
- :ref:`bool<class_bool>` **is_ray_pickable** **(** **)**
|
||
|
|
||
|
If ``true``, 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 :ref:`collision_layer<class_CollisionObject_property_collision_layer>` bit to be set.
|
||
|
|
||
|
.. rst-class:: classref-section-separator
|
||
|
|
||
|
----
|
||
|
|
||
|
.. rst-class:: classref-descriptions-group
|
||
|
|
||
|
Method Descriptions
|
||
|
-------------------
|
||
|
|
||
|
.. _class_CollisionObject_method__input_event:
|
||
|
|
||
|
.. rst-class:: classref-method
|
||
|
|
||
|
void **_input_event** **(** :ref:`Object<class_Object>` camera, :ref:`InputEvent<class_InputEvent>` event, :ref:`Vector3<class_Vector3>` position, :ref:`Vector3<class_Vector3>` normal, :ref:`int<class_int>` shape_idx **)** |virtual|
|
||
|
|
||
|
Receives unhandled :ref:`InputEvent<class_InputEvent>`\ s. ``position`` is the location in world space of the mouse pointer on the surface of the shape with index ``shape_idx`` and ``normal`` is the normal vector of the surface at that point. Connect to the :ref:`input_event<class_CollisionObject_signal_input_event>` signal to easily pick up these events.
|
||
|
|
||
|
.. rst-class:: classref-item-separator
|
||
|
|
||
|
----
|
||
|
|
||
|
.. _class_CollisionObject_method_create_shape_owner:
|
||
|
|
||
|
.. rst-class:: classref-method
|
||
|
|
||
|
:ref:`int<class_int>` **create_shape_owner** **(** :ref:`Object<class_Object>` owner **)**
|
||
|
|
||
|
Creates a new shape owner for the given object. Returns ``owner_id`` of the new owner for future reference.
|
||
|
|
||
|
.. rst-class:: classref-item-separator
|
||
|
|
||
|
----
|
||
|
|
||
|
.. _class_CollisionObject_method_get_collision_layer_bit:
|
||
|
|
||
|
.. rst-class:: classref-method
|
||
|
|
||
|
:ref:`bool<class_bool>` **get_collision_layer_bit** **(** :ref:`int<class_int>` bit **)** |const|
|
||
|
|
||
|
Returns whether or not the specified ``bit`` of the :ref:`collision_layer<class_CollisionObject_property_collision_layer>` is set.
|
||
|
|
||
|
.. rst-class:: classref-item-separator
|
||
|
|
||
|
----
|
||
|
|
||
|
.. _class_CollisionObject_method_get_collision_mask_bit:
|
||
|
|
||
|
.. rst-class:: classref-method
|
||
|
|
||
|
:ref:`bool<class_bool>` **get_collision_mask_bit** **(** :ref:`int<class_int>` bit **)** |const|
|
||
|
|
||
|
Returns whether or not the specified ``bit`` of the :ref:`collision_mask<class_CollisionObject_property_collision_mask>` is set.
|
||
|
|
||
|
.. rst-class:: classref-item-separator
|
||
|
|
||
|
----
|
||
|
|
||
|
.. _class_CollisionObject_method_get_rid:
|
||
|
|
||
|
.. rst-class:: classref-method
|
||
|
|
||
|
:ref:`RID<class_RID>` **get_rid** **(** **)** |const|
|
||
|
|
||
|
Returns the object's :ref:`RID<class_RID>`.
|
||
|
|
||
|
.. rst-class:: classref-item-separator
|
||
|
|
||
|
----
|
||
|
|
||
|
.. _class_CollisionObject_method_get_shape_owners:
|
||
|
|
||
|
.. rst-class:: classref-method
|
||
|
|
||
|
:ref:`Array<class_Array>` **get_shape_owners** **(** **)**
|
||
|
|
||
|
Returns an :ref:`Array<class_Array>` of ``owner_id`` identifiers. You can use these ids in other methods that take ``owner_id`` as an argument.
|
||
|
|
||
|
.. rst-class:: classref-item-separator
|
||
|
|
||
|
----
|
||
|
|
||
|
.. _class_CollisionObject_method_is_shape_owner_disabled:
|
||
|
|
||
|
.. rst-class:: classref-method
|
||
|
|
||
|
:ref:`bool<class_bool>` **is_shape_owner_disabled** **(** :ref:`int<class_int>` owner_id **)** |const|
|
||
|
|
||
|
If ``true``, the shape owner and its shapes are disabled.
|
||
|
|
||
|
.. rst-class:: classref-item-separator
|
||
|
|
||
|
----
|
||
|
|
||
|
.. _class_CollisionObject_method_remove_shape_owner:
|
||
|
|
||
|
.. rst-class:: classref-method
|
||
|
|
||
|
void **remove_shape_owner** **(** :ref:`int<class_int>` owner_id **)**
|
||
|
|
||
|
Removes the given shape owner.
|
||
|
|
||
|
.. rst-class:: classref-item-separator
|
||
|
|
||
|
----
|
||
|
|
||
|
.. _class_CollisionObject_method_set_collision_layer_bit:
|
||
|
|
||
|
.. rst-class:: classref-method
|
||
|
|
||
|
void **set_collision_layer_bit** **(** :ref:`int<class_int>` bit, :ref:`bool<class_bool>` value **)**
|
||
|
|
||
|
If ``value`` is ``true``, sets the specified ``bit`` in the :ref:`collision_layer<class_CollisionObject_property_collision_layer>`.
|
||
|
|
||
|
If ``value`` is ``false``, clears the specified ``bit`` in the :ref:`collision_layer<class_CollisionObject_property_collision_layer>`.
|
||
|
|
||
|
.. rst-class:: classref-item-separator
|
||
|
|
||
|
----
|
||
|
|
||
|
.. _class_CollisionObject_method_set_collision_mask_bit:
|
||
|
|
||
|
.. rst-class:: classref-method
|
||
|
|
||
|
void **set_collision_mask_bit** **(** :ref:`int<class_int>` bit, :ref:`bool<class_bool>` value **)**
|
||
|
|
||
|
If ``value`` is ``true``, sets the specified ``bit`` in the :ref:`collision_mask<class_CollisionObject_property_collision_mask>`.
|
||
|
|
||
|
If ``value`` is ``false``, clears the specified ``bit`` in the :ref:`collision_mask<class_CollisionObject_property_collision_mask>`.
|
||
|
|
||
|
.. rst-class:: classref-item-separator
|
||
|
|
||
|
----
|
||
|
|
||
|
.. _class_CollisionObject_method_shape_find_owner:
|
||
|
|
||
|
.. rst-class:: classref-method
|
||
|
|
||
|
:ref:`int<class_int>` **shape_find_owner** **(** :ref:`int<class_int>` shape_index **)** |const|
|
||
|
|
||
|
Returns the ``owner_id`` of the given shape.
|
||
|
|
||
|
.. rst-class:: classref-item-separator
|
||
|
|
||
|
----
|
||
|
|
||
|
.. _class_CollisionObject_method_shape_owner_add_shape:
|
||
|
|
||
|
.. rst-class:: classref-method
|
||
|
|
||
|
void **shape_owner_add_shape** **(** :ref:`int<class_int>` owner_id, :ref:`Shape<class_Shape>` shape **)**
|
||
|
|
||
|
Adds a :ref:`Shape<class_Shape>` to the shape owner.
|
||
|
|
||
|
.. rst-class:: classref-item-separator
|
||
|
|
||
|
----
|
||
|
|
||
|
.. _class_CollisionObject_method_shape_owner_clear_shapes:
|
||
|
|
||
|
.. rst-class:: classref-method
|
||
|
|
||
|
void **shape_owner_clear_shapes** **(** :ref:`int<class_int>` owner_id **)**
|
||
|
|
||
|
Removes all shapes from the shape owner.
|
||
|
|
||
|
.. rst-class:: classref-item-separator
|
||
|
|
||
|
----
|
||
|
|
||
|
.. _class_CollisionObject_method_shape_owner_get_owner:
|
||
|
|
||
|
.. rst-class:: classref-method
|
||
|
|
||
|
:ref:`Object<class_Object>` **shape_owner_get_owner** **(** :ref:`int<class_int>` owner_id **)** |const|
|
||
|
|
||
|
Returns the parent object of the given shape owner.
|
||
|
|
||
|
.. rst-class:: classref-item-separator
|
||
|
|
||
|
----
|
||
|
|
||
|
.. _class_CollisionObject_method_shape_owner_get_shape:
|
||
|
|
||
|
.. rst-class:: classref-method
|
||
|
|
||
|
:ref:`Shape<class_Shape>` **shape_owner_get_shape** **(** :ref:`int<class_int>` owner_id, :ref:`int<class_int>` shape_id **)** |const|
|
||
|
|
||
|
Returns the :ref:`Shape<class_Shape>` with the given id from the given shape owner.
|
||
|
|
||
|
.. rst-class:: classref-item-separator
|
||
|
|
||
|
----
|
||
|
|
||
|
.. _class_CollisionObject_method_shape_owner_get_shape_count:
|
||
|
|
||
|
.. rst-class:: classref-method
|
||
|
|
||
|
:ref:`int<class_int>` **shape_owner_get_shape_count** **(** :ref:`int<class_int>` owner_id **)** |const|
|
||
|
|
||
|
Returns the number of shapes the given shape owner contains.
|
||
|
|
||
|
.. rst-class:: classref-item-separator
|
||
|
|
||
|
----
|
||
|
|
||
|
.. _class_CollisionObject_method_shape_owner_get_shape_index:
|
||
|
|
||
|
.. rst-class:: classref-method
|
||
|
|
||
|
:ref:`int<class_int>` **shape_owner_get_shape_index** **(** :ref:`int<class_int>` owner_id, :ref:`int<class_int>` shape_id **)** |const|
|
||
|
|
||
|
Returns the child index of the :ref:`Shape<class_Shape>` with the given id from the given shape owner.
|
||
|
|
||
|
.. rst-class:: classref-item-separator
|
||
|
|
||
|
----
|
||
|
|
||
|
.. _class_CollisionObject_method_shape_owner_get_transform:
|
||
|
|
||
|
.. rst-class:: classref-method
|
||
|
|
||
|
:ref:`Transform<class_Transform>` **shape_owner_get_transform** **(** :ref:`int<class_int>` owner_id **)** |const|
|
||
|
|
||
|
Returns the shape owner's :ref:`Transform<class_Transform>`.
|
||
|
|
||
|
.. rst-class:: classref-item-separator
|
||
|
|
||
|
----
|
||
|
|
||
|
.. _class_CollisionObject_method_shape_owner_remove_shape:
|
||
|
|
||
|
.. rst-class:: classref-method
|
||
|
|
||
|
void **shape_owner_remove_shape** **(** :ref:`int<class_int>` owner_id, :ref:`int<class_int>` shape_id **)**
|
||
|
|
||
|
Removes a shape from the given shape owner.
|
||
|
|
||
|
.. rst-class:: classref-item-separator
|
||
|
|
||
|
----
|
||
|
|
||
|
.. _class_CollisionObject_method_shape_owner_set_disabled:
|
||
|
|
||
|
.. rst-class:: classref-method
|
||
|
|
||
|
void **shape_owner_set_disabled** **(** :ref:`int<class_int>` owner_id, :ref:`bool<class_bool>` disabled **)**
|
||
|
|
||
|
If ``true``, disables the given shape owner.
|
||
|
|
||
|
.. rst-class:: classref-item-separator
|
||
|
|
||
|
----
|
||
|
|
||
|
.. _class_CollisionObject_method_shape_owner_set_transform:
|
||
|
|
||
|
.. rst-class:: classref-method
|
||
|
|
||
|
void **shape_owner_set_transform** **(** :ref:`int<class_int>` owner_id, :ref:`Transform<class_Transform>` transform **)**
|
||
|
|
||
|
Sets the :ref:`Transform<class_Transform>` of the given shape owner.
|
||
|
|
||
|
.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
|
||
|
.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
|
||
|
.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
|
||
|
.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
|