class_collisionpolygon3d.rst 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109
  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/master/doc/tools/make_rst.py.
  5. .. XML source: https://github.com/godotengine/godot/tree/master/doc/classes/CollisionPolygon3D.xml.
  6. .. _class_CollisionPolygon3D:
  7. CollisionPolygon3D
  8. ==================
  9. **Inherits:** :ref:`Node3D<class_Node3D>` **<** :ref:`Node<class_Node>` **<** :ref:`Object<class_Object>`
  10. Editor-only node for defining a collision polygon in 3D space.
  11. Description
  12. -----------
  13. Allows editing a concave or convex collision polygon's vertices on a selected plane. Can also set a depth perpendicular to that plane. This class is only available in the editor. It will not appear in the scene tree at run-time. Creates several :ref:`ConvexPolygonShape3D<class_ConvexPolygonShape3D>`\ s at run-time to represent the original polygon using convex decomposition.
  14. \ **Note:** Since this is an editor-only helper, properties modified during gameplay will have no effect.
  15. Properties
  16. ----------
  17. +-----------------------------------------------------+-------------------------------------------------------------+--------------------------+
  18. | :ref:`float<class_float>` | :ref:`depth<class_CollisionPolygon3D_property_depth>` | ``1.0`` |
  19. +-----------------------------------------------------+-------------------------------------------------------------+--------------------------+
  20. | :ref:`bool<class_bool>` | :ref:`disabled<class_CollisionPolygon3D_property_disabled>` | ``false`` |
  21. +-----------------------------------------------------+-------------------------------------------------------------+--------------------------+
  22. | :ref:`float<class_float>` | :ref:`margin<class_CollisionPolygon3D_property_margin>` | ``0.04`` |
  23. +-----------------------------------------------------+-------------------------------------------------------------+--------------------------+
  24. | :ref:`PackedVector2Array<class_PackedVector2Array>` | :ref:`polygon<class_CollisionPolygon3D_property_polygon>` | ``PackedVector2Array()`` |
  25. +-----------------------------------------------------+-------------------------------------------------------------+--------------------------+
  26. Property Descriptions
  27. ---------------------
  28. .. _class_CollisionPolygon3D_property_depth:
  29. - :ref:`float<class_float>` **depth**
  30. +-----------+------------------+
  31. | *Default* | ``1.0`` |
  32. +-----------+------------------+
  33. | *Setter* | set_depth(value) |
  34. +-----------+------------------+
  35. | *Getter* | get_depth() |
  36. +-----------+------------------+
  37. Length that the resulting collision extends in either direction perpendicular to its polygon.
  38. ----
  39. .. _class_CollisionPolygon3D_property_disabled:
  40. - :ref:`bool<class_bool>` **disabled**
  41. +-----------+---------------------+
  42. | *Default* | ``false`` |
  43. +-----------+---------------------+
  44. | *Setter* | set_disabled(value) |
  45. +-----------+---------------------+
  46. | *Getter* | is_disabled() |
  47. +-----------+---------------------+
  48. If ``true``, no collision will be produced.
  49. ----
  50. .. _class_CollisionPolygon3D_property_margin:
  51. - :ref:`float<class_float>` **margin**
  52. +-----------+-------------------+
  53. | *Default* | ``0.04`` |
  54. +-----------+-------------------+
  55. | *Setter* | set_margin(value) |
  56. +-----------+-------------------+
  57. | *Getter* | get_margin() |
  58. +-----------+-------------------+
  59. The collision margin for the generated :ref:`Shape3D<class_Shape3D>`. See :ref:`Shape3D.margin<class_Shape3D_property_margin>` for more details.
  60. ----
  61. .. _class_CollisionPolygon3D_property_polygon:
  62. - :ref:`PackedVector2Array<class_PackedVector2Array>` **polygon**
  63. +-----------+--------------------------+
  64. | *Default* | ``PackedVector2Array()`` |
  65. +-----------+--------------------------+
  66. | *Setter* | set_polygon(value) |
  67. +-----------+--------------------------+
  68. | *Getter* | get_polygon() |
  69. +-----------+--------------------------+
  70. Array of vertices which define the polygon.
  71. \ **Note:** The returned value is a copy of the original. Methods which mutate the size or properties of the return value will not impact the original polygon. To change properties of the polygon, assign it to a temporary variable and make changes before reassigning the ``polygon`` member.
  72. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
  73. .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
  74. .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
  75. .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
  76. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
  77. .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`