class_physics2dshapequeryparameters.rst 8.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188
  1. :github_url: hide
  2. .. Generated automatically by doc/tools/make_rst.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. Parameters to be sent to a 2D shape physics query.
  10. Description
  11. -----------
  12. This class contains the shape and other parameters for 2D intersection/collision queries.
  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. Property Descriptions
  38. ---------------------
  39. .. _class_Physics2DShapeQueryParameters_property_collide_with_areas:
  40. - :ref:`bool<class_bool>` **collide_with_areas**
  41. +-----------+---------------------------------+
  42. | *Default* | ``false`` |
  43. +-----------+---------------------------------+
  44. | *Setter* | set_collide_with_areas(value) |
  45. +-----------+---------------------------------+
  46. | *Getter* | is_collide_with_areas_enabled() |
  47. +-----------+---------------------------------+
  48. If ``true``, the query will take :ref:`Area2D<class_Area2D>`\ s into account.
  49. ----
  50. .. _class_Physics2DShapeQueryParameters_property_collide_with_bodies:
  51. - :ref:`bool<class_bool>` **collide_with_bodies**
  52. +-----------+----------------------------------+
  53. | *Default* | ``true`` |
  54. +-----------+----------------------------------+
  55. | *Setter* | set_collide_with_bodies(value) |
  56. +-----------+----------------------------------+
  57. | *Getter* | is_collide_with_bodies_enabled() |
  58. +-----------+----------------------------------+
  59. If ``true``, the query will take :ref:`PhysicsBody2D<class_PhysicsBody2D>`\ s into account.
  60. ----
  61. .. _class_Physics2DShapeQueryParameters_property_collision_layer:
  62. - :ref:`int<class_int>` **collision_layer**
  63. +-----------+----------------------------+
  64. | *Default* | ``2147483647`` |
  65. +-----------+----------------------------+
  66. | *Setter* | set_collision_layer(value) |
  67. +-----------+----------------------------+
  68. | *Getter* | get_collision_layer() |
  69. +-----------+----------------------------+
  70. The physics layer(s) the query will take into account (as a bitmask). See `Collision layers and masks <https://docs.godotengine.org/en/3.4/tutorials/physics/physics_introduction.html#collision-layers-and-masks>`__ in the documentation for more information.
  71. ----
  72. .. _class_Physics2DShapeQueryParameters_property_exclude:
  73. - :ref:`Array<class_Array>` **exclude**
  74. +-----------+--------------------+
  75. | *Default* | ``[ ]`` |
  76. +-----------+--------------------+
  77. | *Setter* | set_exclude(value) |
  78. +-----------+--------------------+
  79. | *Getter* | get_exclude() |
  80. +-----------+--------------------+
  81. The list of objects or object :ref:`RID<class_RID>`\ s that will be excluded from collisions.
  82. ----
  83. .. _class_Physics2DShapeQueryParameters_property_margin:
  84. - :ref:`float<class_float>` **margin**
  85. +-----------+-------------------+
  86. | *Default* | ``0.0`` |
  87. +-----------+-------------------+
  88. | *Setter* | set_margin(value) |
  89. +-----------+-------------------+
  90. | *Getter* | get_margin() |
  91. +-----------+-------------------+
  92. The collision margin for the shape.
  93. ----
  94. .. _class_Physics2DShapeQueryParameters_property_motion:
  95. - :ref:`Vector2<class_Vector2>` **motion**
  96. +-----------+---------------------+
  97. | *Default* | ``Vector2( 0, 0 )`` |
  98. +-----------+---------------------+
  99. | *Setter* | set_motion(value) |
  100. +-----------+---------------------+
  101. | *Getter* | get_motion() |
  102. +-----------+---------------------+
  103. The motion of the shape being queried for.
  104. ----
  105. .. _class_Physics2DShapeQueryParameters_property_shape_rid:
  106. - :ref:`RID<class_RID>` **shape_rid**
  107. +----------+----------------------+
  108. | *Setter* | set_shape_rid(value) |
  109. +----------+----------------------+
  110. | *Getter* | get_shape_rid() |
  111. +----------+----------------------+
  112. The queried shape's :ref:`RID<class_RID>`. See also :ref:`set_shape<class_Physics2DShapeQueryParameters_method_set_shape>`.
  113. ----
  114. .. _class_Physics2DShapeQueryParameters_property_transform:
  115. - :ref:`Transform2D<class_Transform2D>` **transform**
  116. +-----------+-------------------------------------+
  117. | *Default* | ``Transform2D( 1, 0, 0, 1, 0, 0 )`` |
  118. +-----------+-------------------------------------+
  119. | *Setter* | set_transform(value) |
  120. +-----------+-------------------------------------+
  121. | *Getter* | get_transform() |
  122. +-----------+-------------------------------------+
  123. The queried shape's transform matrix.
  124. Method Descriptions
  125. -------------------
  126. .. _class_Physics2DShapeQueryParameters_method_set_shape:
  127. - void **set_shape** **(** :ref:`Resource<class_Resource>` shape **)**
  128. Sets the :ref:`Shape2D<class_Shape2D>` that will be used for collision/intersection queries.
  129. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
  130. .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
  131. .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`