123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101 |
- :github_url: hide
- .. Generated automatically by doc/tools/make_rst.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>`
- Node that represents collision shape data in 3D space.
- 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 create a solid object. **IMPORTANT**: this is an Editor-only helper to create shapes, use :ref:`CollisionObject.shape_owner_get_shape<class_CollisionObject_method_shape_owner_get_shape>` to get the actual shape.
- Tutorials
- ---------
- - :doc:`../tutorials/physics/physics_introduction`
- - `3D Kinematic Character Demo <https://godotengine.org/asset-library/asset/126>`__
- - `3D Platformer Demo <https://godotengine.org/asset-library/asset/125>`__
- - `Third Person Shooter Demo <https://godotengine.org/asset-library/asset/678>`__
- Properties
- ----------
- +---------------------------+---------------------------------------------------------+-----------+
- | :ref:`bool<class_bool>` | :ref:`disabled<class_CollisionShape_property_disabled>` | ``false`` |
- +---------------------------+---------------------------------------------------------+-----------+
- | :ref:`Shape<class_Shape>` | :ref:`shape<class_CollisionShape_property_shape>` | |
- +---------------------------+---------------------------------------------------------+-----------+
- Methods
- -------
- +------+----------------------------------------------------------------------------------------------------------------------------+
- | void | :ref:`make_convex_from_brothers<class_CollisionShape_method_make_convex_from_brothers>` **(** **)** |
- +------+----------------------------------------------------------------------------------------------------------------------------+
- | void | :ref:`resource_changed<class_CollisionShape_method_resource_changed>` **(** :ref:`Resource<class_Resource>` resource **)** |
- +------+----------------------------------------------------------------------------------------------------------------------------+
- Property Descriptions
- ---------------------
- .. _class_CollisionShape_property_disabled:
- - :ref:`bool<class_bool>` **disabled**
- +-----------+---------------------+
- | *Default* | ``false`` |
- +-----------+---------------------+
- | *Setter* | set_disabled(value) |
- +-----------+---------------------+
- | *Getter* | is_disabled() |
- +-----------+---------------------+
- A disabled collision shape has no effect in the world.
- ----
- .. _class_CollisionShape_property_shape:
- - :ref:`Shape<class_Shape>` **shape**
- +----------+------------------+
- | *Setter* | set_shape(value) |
- +----------+------------------+
- | *Getter* | get_shape() |
- +----------+------------------+
- The actual shape owned by this collision shape.
- Method Descriptions
- -------------------
- .. _class_CollisionShape_method_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_method_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.
- .. |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.)`
|