class_collisionpolygon3d.rst 7.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167
  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. A node that provides a thickened polygon shape (a prism) to a :ref:`CollisionObject3D<class_CollisionObject3D>` parent.
  11. .. rst-class:: classref-introduction-group
  12. Description
  13. -----------
  14. A node that provides a thickened polygon shape (a prism) to a :ref:`CollisionObject3D<class_CollisionObject3D>` parent and allows to edit it. The polygon can be concave or convex. This can give a detection shape to an :ref:`Area3D<class_Area3D>` or turn :ref:`PhysicsBody3D<class_PhysicsBody3D>` into a solid object.
  15. \ **Warning:** A non-uniformly scaled :ref:`CollisionShape3D<class_CollisionShape3D>` will likely not behave as expected. Make sure to keep its scale the same on all axes and adjust its shape resource instead.
  16. .. rst-class:: classref-reftable-group
  17. Properties
  18. ----------
  19. .. table::
  20. :widths: auto
  21. +-----------------------------------------------------+-------------------------------------------------------------------+--------------------------+
  22. | :ref:`Color<class_Color>` | :ref:`debug_color<class_CollisionPolygon3D_property_debug_color>` | ``Color(0, 0, 0, 0)`` |
  23. +-----------------------------------------------------+-------------------------------------------------------------------+--------------------------+
  24. | :ref:`bool<class_bool>` | :ref:`debug_fill<class_CollisionPolygon3D_property_debug_fill>` | ``true`` |
  25. +-----------------------------------------------------+-------------------------------------------------------------------+--------------------------+
  26. | :ref:`float<class_float>` | :ref:`depth<class_CollisionPolygon3D_property_depth>` | ``1.0`` |
  27. +-----------------------------------------------------+-------------------------------------------------------------------+--------------------------+
  28. | :ref:`bool<class_bool>` | :ref:`disabled<class_CollisionPolygon3D_property_disabled>` | ``false`` |
  29. +-----------------------------------------------------+-------------------------------------------------------------------+--------------------------+
  30. | :ref:`float<class_float>` | :ref:`margin<class_CollisionPolygon3D_property_margin>` | ``0.04`` |
  31. +-----------------------------------------------------+-------------------------------------------------------------------+--------------------------+
  32. | :ref:`PackedVector2Array<class_PackedVector2Array>` | :ref:`polygon<class_CollisionPolygon3D_property_polygon>` | ``PackedVector2Array()`` |
  33. +-----------------------------------------------------+-------------------------------------------------------------------+--------------------------+
  34. .. rst-class:: classref-section-separator
  35. ----
  36. .. rst-class:: classref-descriptions-group
  37. Property Descriptions
  38. ---------------------
  39. .. _class_CollisionPolygon3D_property_debug_color:
  40. .. rst-class:: classref-property
  41. :ref:`Color<class_Color>` **debug_color** = ``Color(0, 0, 0, 0)`` :ref:`🔗<class_CollisionPolygon3D_property_debug_color>`
  42. .. rst-class:: classref-property-setget
  43. - |void| **set_debug_color**\ (\ value\: :ref:`Color<class_Color>`\ )
  44. - :ref:`Color<class_Color>` **get_debug_color**\ (\ )
  45. The collision shape color that is displayed in the editor, or in the running project if **Debug > Visible Collision Shapes** is checked at the top of the editor.
  46. \ **Note:** The default value is :ref:`ProjectSettings.debug/shapes/collision/shape_color<class_ProjectSettings_property_debug/shapes/collision/shape_color>`. The ``Color(0, 0, 0, 0)`` value documented here is a placeholder, and not the actual default debug color.
  47. .. rst-class:: classref-item-separator
  48. ----
  49. .. _class_CollisionPolygon3D_property_debug_fill:
  50. .. rst-class:: classref-property
  51. :ref:`bool<class_bool>` **debug_fill** = ``true`` :ref:`🔗<class_CollisionPolygon3D_property_debug_fill>`
  52. .. rst-class:: classref-property-setget
  53. - |void| **set_enable_debug_fill**\ (\ value\: :ref:`bool<class_bool>`\ )
  54. - :ref:`bool<class_bool>` **get_enable_debug_fill**\ (\ )
  55. If ``true``, when the shape is displayed, it will show a solid fill color in addition to its wireframe.
  56. .. rst-class:: classref-item-separator
  57. ----
  58. .. _class_CollisionPolygon3D_property_depth:
  59. .. rst-class:: classref-property
  60. :ref:`float<class_float>` **depth** = ``1.0`` :ref:`🔗<class_CollisionPolygon3D_property_depth>`
  61. .. rst-class:: classref-property-setget
  62. - |void| **set_depth**\ (\ value\: :ref:`float<class_float>`\ )
  63. - :ref:`float<class_float>` **get_depth**\ (\ )
  64. Length that the resulting collision extends in either direction perpendicular to its 2D polygon.
  65. .. rst-class:: classref-item-separator
  66. ----
  67. .. _class_CollisionPolygon3D_property_disabled:
  68. .. rst-class:: classref-property
  69. :ref:`bool<class_bool>` **disabled** = ``false`` :ref:`🔗<class_CollisionPolygon3D_property_disabled>`
  70. .. rst-class:: classref-property-setget
  71. - |void| **set_disabled**\ (\ value\: :ref:`bool<class_bool>`\ )
  72. - :ref:`bool<class_bool>` **is_disabled**\ (\ )
  73. If ``true``, no collision will be produced.
  74. .. rst-class:: classref-item-separator
  75. ----
  76. .. _class_CollisionPolygon3D_property_margin:
  77. .. rst-class:: classref-property
  78. :ref:`float<class_float>` **margin** = ``0.04`` :ref:`🔗<class_CollisionPolygon3D_property_margin>`
  79. .. rst-class:: classref-property-setget
  80. - |void| **set_margin**\ (\ value\: :ref:`float<class_float>`\ )
  81. - :ref:`float<class_float>` **get_margin**\ (\ )
  82. The collision margin for the generated :ref:`Shape3D<class_Shape3D>`. See :ref:`Shape3D.margin<class_Shape3D_property_margin>` for more details.
  83. .. rst-class:: classref-item-separator
  84. ----
  85. .. _class_CollisionPolygon3D_property_polygon:
  86. .. rst-class:: classref-property
  87. :ref:`PackedVector2Array<class_PackedVector2Array>` **polygon** = ``PackedVector2Array()`` :ref:`🔗<class_CollisionPolygon3D_property_polygon>`
  88. .. rst-class:: classref-property-setget
  89. - |void| **set_polygon**\ (\ value\: :ref:`PackedVector2Array<class_PackedVector2Array>`\ )
  90. - :ref:`PackedVector2Array<class_PackedVector2Array>` **get_polygon**\ (\ )
  91. Array of vertices which define the 2D polygon in the local XY plane.
  92. **Note:** The returned array is *copied* and any changes to it will not update the original property value. See :ref:`PackedVector2Array<class_PackedVector2Array>` for more details.
  93. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
  94. .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
  95. .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
  96. .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
  97. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
  98. .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`
  99. .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)`
  100. .. |void| replace:: :abbr:`void (No return value.)`