Files
godot-docs/classes/class_collisionshape.rst
2017-09-23 11:01:36 +02:00

79 lines
4.0 KiB
ReStructuredText

.. Generated automatically by doc/tools/makerst.py in Godot's source tree.
.. DO NOT EDIT THIS FILE, but the CollisionShape.xml source instead.
.. The source is found in doc/classes or modules/<name>/doc_classes.
.. _class_CollisionShape:
CollisionShape
==============
**Inherits:** :ref:`Spatial<class_spatial>` **<** :ref:`Node<class_node>` **<** :ref:`Object<class_object>`
**Category:** Core
Brief Description
-----------------
Node that represents collision shape data in 3D space.
Member Functions
----------------
+----------------------------+-----------------------------------------------------------------------------------------------------------------------+
| :ref:`Shape<class_shape>` | :ref:`get_shape<class_CollisionShape_get_shape>` **(** **)** const |
+----------------------------+-----------------------------------------------------------------------------------------------------------------------+
| :ref:`bool<class_bool>` | :ref:`is_disabled<class_CollisionShape_is_disabled>` **(** **)** const |
+----------------------------+-----------------------------------------------------------------------------------------------------------------------+
| void | :ref:`make_convex_from_brothers<class_CollisionShape_make_convex_from_brothers>` **(** **)** |
+----------------------------+-----------------------------------------------------------------------------------------------------------------------+
| void | :ref:`resource_changed<class_CollisionShape_resource_changed>` **(** :ref:`Resource<class_resource>` resource **)** |
+----------------------------+-----------------------------------------------------------------------------------------------------------------------+
| void | :ref:`set_disabled<class_CollisionShape_set_disabled>` **(** :ref:`bool<class_bool>` enable **)** |
+----------------------------+-----------------------------------------------------------------------------------------------------------------------+
| void | :ref:`set_shape<class_CollisionShape_set_shape>` **(** :ref:`Shape<class_shape>` shape **)** |
+----------------------------+-----------------------------------------------------------------------------------------------------------------------+
Member Variables
----------------
- :ref:`bool<class_bool>` **disabled** - A disabled collision shape has no effect in the world.
- :ref:`Shape<class_shape>` **shape** - The actual shape owned by this collision shape.
Description
-----------
Editor facility for creating and editing collision shapes in 3D space. You can use this node to represent all sorts of collision shapes, for example, add this to an :ref:`Area<class_area>` to give it a detection shape, or add it to a :ref:`PhysicsBody<class_physicsbody>` to give create solid object. **IMPORTANT**: this is an Editor-only helper to create shapes, use :ref:`get_shape<class_CollisionShape_get_shape>` to get the actual shape.
Member Function Description
---------------------------
.. _class_CollisionShape_get_shape:
- :ref:`Shape<class_shape>` **get_shape** **(** **)** const
.. _class_CollisionShape_is_disabled:
- :ref:`bool<class_bool>` **is_disabled** **(** **)** const
.. _class_CollisionShape_make_convex_from_brothers:
- void **make_convex_from_brothers** **(** **)**
Sets the collision shape's shape to the addition of all its convexed :ref:`MeshInstance<class_meshinstance>` siblings geometry.
.. _class_CollisionShape_resource_changed:
- void **resource_changed** **(** :ref:`Resource<class_resource>` resource **)**
If this method exists within a script it will be called whenever the shape resource has been modified.
.. _class_CollisionShape_set_disabled:
- void **set_disabled** **(** :ref:`bool<class_bool>` enable **)**
.. _class_CollisionShape_set_shape:
- void **set_shape** **(** :ref:`Shape<class_shape>` shape **)**