class_physicsshapequeryparameters.rst 8.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170
  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 PhysicsShapeQueryParameters.xml source instead.
  4. .. The source is found in doc/classes or modules/<name>/doc_classes.
  5. .. _class_PhysicsShapeQueryParameters:
  6. PhysicsShapeQueryParameters
  7. ===========================
  8. **Inherits:** :ref:`Reference<class_Reference>` **<** :ref:`Object<class_Object>`
  9. Parameters to be sent to a 3D shape physics query.
  10. Description
  11. -----------
  12. This class contains the shape and other parameters for 3D intersection/collision queries. See also :ref:`PhysicsShapeQueryResult<class_PhysicsShapeQueryResult>`.
  13. Properties
  14. ----------
  15. +-----------------------------------+--------------------------------------------------------------------------------------------+-----------------------------------------------------+
  16. | :ref:`bool<class_bool>` | :ref:`collide_with_areas<class_PhysicsShapeQueryParameters_property_collide_with_areas>` | ``false`` |
  17. +-----------------------------------+--------------------------------------------------------------------------------------------+-----------------------------------------------------+
  18. | :ref:`bool<class_bool>` | :ref:`collide_with_bodies<class_PhysicsShapeQueryParameters_property_collide_with_bodies>` | ``true`` |
  19. +-----------------------------------+--------------------------------------------------------------------------------------------+-----------------------------------------------------+
  20. | :ref:`int<class_int>` | :ref:`collision_mask<class_PhysicsShapeQueryParameters_property_collision_mask>` | ``2147483647`` |
  21. +-----------------------------------+--------------------------------------------------------------------------------------------+-----------------------------------------------------+
  22. | :ref:`Array<class_Array>` | :ref:`exclude<class_PhysicsShapeQueryParameters_property_exclude>` | ``[ ]`` |
  23. +-----------------------------------+--------------------------------------------------------------------------------------------+-----------------------------------------------------+
  24. | :ref:`float<class_float>` | :ref:`margin<class_PhysicsShapeQueryParameters_property_margin>` | ``0.0`` |
  25. +-----------------------------------+--------------------------------------------------------------------------------------------+-----------------------------------------------------+
  26. | :ref:`RID<class_RID>` | :ref:`shape_rid<class_PhysicsShapeQueryParameters_property_shape_rid>` | |
  27. +-----------------------------------+--------------------------------------------------------------------------------------------+-----------------------------------------------------+
  28. | :ref:`Transform<class_Transform>` | :ref:`transform<class_PhysicsShapeQueryParameters_property_transform>` | ``Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0 )`` |
  29. +-----------------------------------+--------------------------------------------------------------------------------------------+-----------------------------------------------------+
  30. Methods
  31. -------
  32. +------+------------------------------------------------------------------------------------------------------------------------+
  33. | void | :ref:`set_shape<class_PhysicsShapeQueryParameters_method_set_shape>` **(** :ref:`Resource<class_Resource>` shape **)** |
  34. +------+------------------------------------------------------------------------------------------------------------------------+
  35. Property Descriptions
  36. ---------------------
  37. .. _class_PhysicsShapeQueryParameters_property_collide_with_areas:
  38. - :ref:`bool<class_bool>` **collide_with_areas**
  39. +-----------+---------------------------------+
  40. | *Default* | ``false`` |
  41. +-----------+---------------------------------+
  42. | *Setter* | set_collide_with_areas(value) |
  43. +-----------+---------------------------------+
  44. | *Getter* | is_collide_with_areas_enabled() |
  45. +-----------+---------------------------------+
  46. If ``true``, the query will take :ref:`Area<class_Area>`\ s into account.
  47. ----
  48. .. _class_PhysicsShapeQueryParameters_property_collide_with_bodies:
  49. - :ref:`bool<class_bool>` **collide_with_bodies**
  50. +-----------+----------------------------------+
  51. | *Default* | ``true`` |
  52. +-----------+----------------------------------+
  53. | *Setter* | set_collide_with_bodies(value) |
  54. +-----------+----------------------------------+
  55. | *Getter* | is_collide_with_bodies_enabled() |
  56. +-----------+----------------------------------+
  57. If ``true``, the query will take :ref:`PhysicsBody<class_PhysicsBody>`\ s into account.
  58. ----
  59. .. _class_PhysicsShapeQueryParameters_property_collision_mask:
  60. - :ref:`int<class_int>` **collision_mask**
  61. +-----------+---------------------------+
  62. | *Default* | ``2147483647`` |
  63. +-----------+---------------------------+
  64. | *Setter* | set_collision_mask(value) |
  65. +-----------+---------------------------+
  66. | *Getter* | get_collision_mask() |
  67. +-----------+---------------------------+
  68. The physics layer(s) the query will take into account (as a bitmask). See `Collision layers and masks <https://docs.godotengine.org/en/latest/tutorials/physics/physics_introduction.html#collision-layers-and-masks>`_ in the documentation for more information.
  69. ----
  70. .. _class_PhysicsShapeQueryParameters_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. ----
  81. .. _class_PhysicsShapeQueryParameters_property_margin:
  82. - :ref:`float<class_float>` **margin**
  83. +-----------+-------------------+
  84. | *Default* | ``0.0`` |
  85. +-----------+-------------------+
  86. | *Setter* | set_margin(value) |
  87. +-----------+-------------------+
  88. | *Getter* | get_margin() |
  89. +-----------+-------------------+
  90. The collision margin for the shape.
  91. ----
  92. .. _class_PhysicsShapeQueryParameters_property_shape_rid:
  93. - :ref:`RID<class_RID>` **shape_rid**
  94. +----------+----------------------+
  95. | *Setter* | set_shape_rid(value) |
  96. +----------+----------------------+
  97. | *Getter* | get_shape_rid() |
  98. +----------+----------------------+
  99. The queried shape's :ref:`RID<class_RID>`. See also :ref:`set_shape<class_PhysicsShapeQueryParameters_method_set_shape>`.
  100. ----
  101. .. _class_PhysicsShapeQueryParameters_property_transform:
  102. - :ref:`Transform<class_Transform>` **transform**
  103. +-----------+-----------------------------------------------------+
  104. | *Default* | ``Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0 )`` |
  105. +-----------+-----------------------------------------------------+
  106. | *Setter* | set_transform(value) |
  107. +-----------+-----------------------------------------------------+
  108. | *Getter* | get_transform() |
  109. +-----------+-----------------------------------------------------+
  110. The queried shape's transform matrix.
  111. Method Descriptions
  112. -------------------
  113. .. _class_PhysicsShapeQueryParameters_method_set_shape:
  114. - void **set_shape** **(** :ref:`Resource<class_Resource>` shape **)**
  115. Sets the :ref:`Shape<class_Shape>` that will be used for collision/intersection queries.
  116. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
  117. .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
  118. .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`