class_collisionpolygon3d.rst 5.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127
  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:`float<class_float>` | :ref:`depth<class_CollisionPolygon3D_property_depth>` | ``1.0`` |
  23. +-----------------------------------------------------+-------------------------------------------------------------+--------------------------+
  24. | :ref:`bool<class_bool>` | :ref:`disabled<class_CollisionPolygon3D_property_disabled>` | ``false`` |
  25. +-----------------------------------------------------+-------------------------------------------------------------+--------------------------+
  26. | :ref:`float<class_float>` | :ref:`margin<class_CollisionPolygon3D_property_margin>` | ``0.04`` |
  27. +-----------------------------------------------------+-------------------------------------------------------------+--------------------------+
  28. | :ref:`PackedVector2Array<class_PackedVector2Array>` | :ref:`polygon<class_CollisionPolygon3D_property_polygon>` | ``PackedVector2Array()`` |
  29. +-----------------------------------------------------+-------------------------------------------------------------+--------------------------+
  30. .. rst-class:: classref-section-separator
  31. ----
  32. .. rst-class:: classref-descriptions-group
  33. Property Descriptions
  34. ---------------------
  35. .. _class_CollisionPolygon3D_property_depth:
  36. .. rst-class:: classref-property
  37. :ref:`float<class_float>` **depth** = ``1.0`` :ref:`🔗<class_CollisionPolygon3D_property_depth>`
  38. .. rst-class:: classref-property-setget
  39. - |void| **set_depth**\ (\ value\: :ref:`float<class_float>`\ )
  40. - :ref:`float<class_float>` **get_depth**\ (\ )
  41. Length that the resulting collision extends in either direction perpendicular to its 2D polygon.
  42. .. rst-class:: classref-item-separator
  43. ----
  44. .. _class_CollisionPolygon3D_property_disabled:
  45. .. rst-class:: classref-property
  46. :ref:`bool<class_bool>` **disabled** = ``false`` :ref:`🔗<class_CollisionPolygon3D_property_disabled>`
  47. .. rst-class:: classref-property-setget
  48. - |void| **set_disabled**\ (\ value\: :ref:`bool<class_bool>`\ )
  49. - :ref:`bool<class_bool>` **is_disabled**\ (\ )
  50. If ``true``, no collision will be produced.
  51. .. rst-class:: classref-item-separator
  52. ----
  53. .. _class_CollisionPolygon3D_property_margin:
  54. .. rst-class:: classref-property
  55. :ref:`float<class_float>` **margin** = ``0.04`` :ref:`🔗<class_CollisionPolygon3D_property_margin>`
  56. .. rst-class:: classref-property-setget
  57. - |void| **set_margin**\ (\ value\: :ref:`float<class_float>`\ )
  58. - :ref:`float<class_float>` **get_margin**\ (\ )
  59. The collision margin for the generated :ref:`Shape3D<class_Shape3D>`. See :ref:`Shape3D.margin<class_Shape3D_property_margin>` for more details.
  60. .. rst-class:: classref-item-separator
  61. ----
  62. .. _class_CollisionPolygon3D_property_polygon:
  63. .. rst-class:: classref-property
  64. :ref:`PackedVector2Array<class_PackedVector2Array>` **polygon** = ``PackedVector2Array()`` :ref:`🔗<class_CollisionPolygon3D_property_polygon>`
  65. .. rst-class:: classref-property-setget
  66. - |void| **set_polygon**\ (\ value\: :ref:`PackedVector2Array<class_PackedVector2Array>`\ )
  67. - :ref:`PackedVector2Array<class_PackedVector2Array>` **get_polygon**\ (\ )
  68. Array of vertices which define the 2D polygon in the local XY plane.
  69. **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.
  70. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
  71. .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
  72. .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
  73. .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
  74. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
  75. .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`
  76. .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)`
  77. .. |void| replace:: :abbr:`void (No return value.)`