class_concavepolygonshape.rst 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. :github_url: hide
  2. .. DO NOT EDIT THIS FILE!!!
  3. .. Generated automatically from Godot engine sources.
  4. .. Generator: https://github.com/godotengine/godot/tree/3.6/doc/tools/make_rst.py.
  5. .. XML source: https://github.com/godotengine/godot/tree/3.6/doc/classes/ConcavePolygonShape.xml.
  6. .. _class_ConcavePolygonShape:
  7. ConcavePolygonShape
  8. ===================
  9. **Inherits:** :ref:`Shape<class_Shape>` **<** :ref:`Resource<class_Resource>` **<** :ref:`Reference<class_Reference>` **<** :ref:`Object<class_Object>`
  10. Concave polygon shape.
  11. .. rst-class:: classref-introduction-group
  12. Description
  13. -----------
  14. Concave polygon shape resource, which can be set into a :ref:`PhysicsBody<class_PhysicsBody>` or area. This shape is created by feeding a list of triangles.
  15. \ **Note:** When used for collision, **ConcavePolygonShape** is intended to work with static :ref:`PhysicsBody<class_PhysicsBody>` nodes like :ref:`StaticBody<class_StaticBody>` and will not work with :ref:`KinematicBody<class_KinematicBody>` or :ref:`RigidBody<class_RigidBody>` with a mode other than Static.
  16. \ **Warning:** Using this shape for an :ref:`Area<class_Area>` (via a :ref:`CollisionShape<class_CollisionShape>` node, created e.g. by using the *Create Trimesh Collision Sibling* option in the *Mesh* menu that appears when selecting a :ref:`MeshInstance<class_MeshInstance>` node) may give unexpected results: when using Godot Physics, the area will only detect collisions with the triangle faces in the **ConcavePolygonShape** (and not with any "inside" of the shape, for example), and when using Bullet Physics the area will not detect any collisions with the concave shape at all (this is a known bug).
  17. .. rst-class:: classref-introduction-group
  18. Tutorials
  19. ---------
  20. - `3D Physics Tests Demo <https://godotengine.org/asset-library/asset/675>`__
  21. .. rst-class:: classref-reftable-group
  22. Methods
  23. -------
  24. .. table::
  25. :widths: auto
  26. +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------+
  27. | :ref:`PoolVector3Array<class_PoolVector3Array>` | :ref:`get_faces<class_ConcavePolygonShape_method_get_faces>` **(** **)** |const| |
  28. +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------+
  29. | void | :ref:`set_faces<class_ConcavePolygonShape_method_set_faces>` **(** :ref:`PoolVector3Array<class_PoolVector3Array>` faces **)** |
  30. +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------+
  31. .. rst-class:: classref-section-separator
  32. ----
  33. .. rst-class:: classref-descriptions-group
  34. Method Descriptions
  35. -------------------
  36. .. _class_ConcavePolygonShape_method_get_faces:
  37. .. rst-class:: classref-method
  38. :ref:`PoolVector3Array<class_PoolVector3Array>` **get_faces** **(** **)** |const|
  39. Returns the faces (an array of triangles).
  40. .. rst-class:: classref-item-separator
  41. ----
  42. .. _class_ConcavePolygonShape_method_set_faces:
  43. .. rst-class:: classref-method
  44. void **set_faces** **(** :ref:`PoolVector3Array<class_PoolVector3Array>` faces **)**
  45. Sets the faces (an array of triangles).
  46. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
  47. .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
  48. .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
  49. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`