class_physics2dshapequeryparameters.rst 7.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171
  1. :github_url: hide
  2. .. Generated automatically by doc/tools/makerst.py in Godot's source tree.
  3. .. DO NOT EDIT THIS FILE, but the Physics2DShapeQueryParameters.xml source instead.
  4. .. The source is found in doc/classes or modules/<name>/doc_classes.
  5. .. _class_Physics2DShapeQueryParameters:
  6. Physics2DShapeQueryParameters
  7. =============================
  8. **Inherits:** :ref:`Reference<class_Reference>` **<** :ref:`Object<class_Object>`
  9. **Category:** Core
  10. Brief Description
  11. -----------------
  12. Parameters to be sent to a 2D shape physics query.
  13. Properties
  14. ----------
  15. +---------------------------------------+----------------------------------------------------------------------------------------------+---------------------------------+
  16. | :ref:`bool<class_bool>` | :ref:`collide_with_areas<class_Physics2DShapeQueryParameters_property_collide_with_areas>` | false |
  17. +---------------------------------------+----------------------------------------------------------------------------------------------+---------------------------------+
  18. | :ref:`bool<class_bool>` | :ref:`collide_with_bodies<class_Physics2DShapeQueryParameters_property_collide_with_bodies>` | true |
  19. +---------------------------------------+----------------------------------------------------------------------------------------------+---------------------------------+
  20. | :ref:`int<class_int>` | :ref:`collision_layer<class_Physics2DShapeQueryParameters_property_collision_layer>` | 2147483647 |
  21. +---------------------------------------+----------------------------------------------------------------------------------------------+---------------------------------+
  22. | :ref:`Array<class_Array>` | :ref:`exclude<class_Physics2DShapeQueryParameters_property_exclude>` | [ ] |
  23. +---------------------------------------+----------------------------------------------------------------------------------------------+---------------------------------+
  24. | :ref:`float<class_float>` | :ref:`margin<class_Physics2DShapeQueryParameters_property_margin>` | 0.0 |
  25. +---------------------------------------+----------------------------------------------------------------------------------------------+---------------------------------+
  26. | :ref:`Vector2<class_Vector2>` | :ref:`motion<class_Physics2DShapeQueryParameters_property_motion>` | Vector2( 0, 0 ) |
  27. +---------------------------------------+----------------------------------------------------------------------------------------------+---------------------------------+
  28. | :ref:`RID<class_RID>` | :ref:`shape_rid<class_Physics2DShapeQueryParameters_property_shape_rid>` | |
  29. +---------------------------------------+----------------------------------------------------------------------------------------------+---------------------------------+
  30. | :ref:`Transform2D<class_Transform2D>` | :ref:`transform<class_Physics2DShapeQueryParameters_property_transform>` | Transform2D( 1, 0, 0, 1, 0, 0 ) |
  31. +---------------------------------------+----------------------------------------------------------------------------------------------+---------------------------------+
  32. Methods
  33. -------
  34. +------+--------------------------------------------------------------------------------------------------------------------------+
  35. | void | :ref:`set_shape<class_Physics2DShapeQueryParameters_method_set_shape>` **(** :ref:`Resource<class_Resource>` shape **)** |
  36. +------+--------------------------------------------------------------------------------------------------------------------------+
  37. Description
  38. -----------
  39. This class contains the shape and other parameters for intersection/collision queries.
  40. Property Descriptions
  41. ---------------------
  42. .. _class_Physics2DShapeQueryParameters_property_collide_with_areas:
  43. - :ref:`bool<class_bool>` **collide_with_areas**
  44. +-----------+---------------------------------+
  45. | *Default* | false |
  46. +-----------+---------------------------------+
  47. | *Setter* | set_collide_with_areas(value) |
  48. +-----------+---------------------------------+
  49. | *Getter* | is_collide_with_areas_enabled() |
  50. +-----------+---------------------------------+
  51. .. _class_Physics2DShapeQueryParameters_property_collide_with_bodies:
  52. - :ref:`bool<class_bool>` **collide_with_bodies**
  53. +-----------+----------------------------------+
  54. | *Default* | true |
  55. +-----------+----------------------------------+
  56. | *Setter* | set_collide_with_bodies(value) |
  57. +-----------+----------------------------------+
  58. | *Getter* | is_collide_with_bodies_enabled() |
  59. +-----------+----------------------------------+
  60. .. _class_Physics2DShapeQueryParameters_property_collision_layer:
  61. - :ref:`int<class_int>` **collision_layer**
  62. +-----------+----------------------------+
  63. | *Default* | 2147483647 |
  64. +-----------+----------------------------+
  65. | *Setter* | set_collision_layer(value) |
  66. +-----------+----------------------------+
  67. | *Getter* | get_collision_layer() |
  68. +-----------+----------------------------+
  69. The physics layer the query should be made on.
  70. .. _class_Physics2DShapeQueryParameters_property_exclude:
  71. - :ref:`Array<class_Array>` **exclude**
  72. +-----------+--------------------+
  73. | *Default* | [ ] |
  74. +-----------+--------------------+
  75. | *Setter* | set_exclude(value) |
  76. +-----------+--------------------+
  77. | *Getter* | get_exclude() |
  78. +-----------+--------------------+
  79. The list of objects or object :ref:`RID<class_RID>`\ s, that will be excluded from collisions.
  80. .. _class_Physics2DShapeQueryParameters_property_margin:
  81. - :ref:`float<class_float>` **margin**
  82. +-----------+-------------------+
  83. | *Default* | 0.0 |
  84. +-----------+-------------------+
  85. | *Setter* | set_margin(value) |
  86. +-----------+-------------------+
  87. | *Getter* | get_margin() |
  88. +-----------+-------------------+
  89. The collision margin for the shape.
  90. .. _class_Physics2DShapeQueryParameters_property_motion:
  91. - :ref:`Vector2<class_Vector2>` **motion**
  92. +-----------+-------------------+
  93. | *Default* | Vector2( 0, 0 ) |
  94. +-----------+-------------------+
  95. | *Setter* | set_motion(value) |
  96. +-----------+-------------------+
  97. | *Getter* | get_motion() |
  98. +-----------+-------------------+
  99. The motion of the shape being queried for.
  100. .. _class_Physics2DShapeQueryParameters_property_shape_rid:
  101. - :ref:`RID<class_RID>` **shape_rid**
  102. +----------+----------------------+
  103. | *Setter* | set_shape_rid(value) |
  104. +----------+----------------------+
  105. | *Getter* | get_shape_rid() |
  106. +----------+----------------------+
  107. The :ref:`RID<class_RID>` of the queried shape. See also :ref:`set_shape<class_Physics2DShapeQueryParameters_method_set_shape>`.
  108. .. _class_Physics2DShapeQueryParameters_property_transform:
  109. - :ref:`Transform2D<class_Transform2D>` **transform**
  110. +-----------+---------------------------------+
  111. | *Default* | Transform2D( 1, 0, 0, 1, 0, 0 ) |
  112. +-----------+---------------------------------+
  113. | *Setter* | set_transform(value) |
  114. +-----------+---------------------------------+
  115. | *Getter* | get_transform() |
  116. +-----------+---------------------------------+
  117. the transform matrix of the queried shape.
  118. Method Descriptions
  119. -------------------
  120. .. _class_Physics2DShapeQueryParameters_method_set_shape:
  121. - void **set_shape** **(** :ref:`Resource<class_Resource>` shape **)**
  122. Sets the :ref:`Shape2D<class_Shape2D>` that will be used for collision/intersection queries.