class_physicsrayqueryparameters2d.rst 7.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158
  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 PhysicsRayQueryParameters2D.xml source instead.
  4. .. The source is found in doc/classes or modules/<name>/doc_classes.
  5. .. _class_PhysicsRayQueryParameters2D:
  6. PhysicsRayQueryParameters2D
  7. ===========================
  8. **Inherits:** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>`
  9. Parameters to be sent to a 2D ray physics query.
  10. Description
  11. -----------
  12. This class contains the ray position and other parameters to be used for :ref:`PhysicsDirectSpaceState2D.intersect_ray<class_PhysicsDirectSpaceState2D_method_intersect_ray>`.
  13. Properties
  14. ----------
  15. +-------------------------------+--------------------------------------------------------------------------------------------+-------------------+
  16. | :ref:`bool<class_bool>` | :ref:`collide_with_areas<class_PhysicsRayQueryParameters2D_property_collide_with_areas>` | ``false`` |
  17. +-------------------------------+--------------------------------------------------------------------------------------------+-------------------+
  18. | :ref:`bool<class_bool>` | :ref:`collide_with_bodies<class_PhysicsRayQueryParameters2D_property_collide_with_bodies>` | ``true`` |
  19. +-------------------------------+--------------------------------------------------------------------------------------------+-------------------+
  20. | :ref:`int<class_int>` | :ref:`collision_mask<class_PhysicsRayQueryParameters2D_property_collision_mask>` | ``4294967295`` |
  21. +-------------------------------+--------------------------------------------------------------------------------------------+-------------------+
  22. | :ref:`Array<class_Array>` | :ref:`exclude<class_PhysicsRayQueryParameters2D_property_exclude>` | ``[]`` |
  23. +-------------------------------+--------------------------------------------------------------------------------------------+-------------------+
  24. | :ref:`Vector2<class_Vector2>` | :ref:`from<class_PhysicsRayQueryParameters2D_property_from>` | ``Vector2(0, 0)`` |
  25. +-------------------------------+--------------------------------------------------------------------------------------------+-------------------+
  26. | :ref:`bool<class_bool>` | :ref:`hit_from_inside<class_PhysicsRayQueryParameters2D_property_hit_from_inside>` | ``false`` |
  27. +-------------------------------+--------------------------------------------------------------------------------------------+-------------------+
  28. | :ref:`Vector2<class_Vector2>` | :ref:`to<class_PhysicsRayQueryParameters2D_property_to>` | ``Vector2(0, 0)`` |
  29. +-------------------------------+--------------------------------------------------------------------------------------------+-------------------+
  30. Property Descriptions
  31. ---------------------
  32. .. _class_PhysicsRayQueryParameters2D_property_collide_with_areas:
  33. - :ref:`bool<class_bool>` **collide_with_areas**
  34. +-----------+---------------------------------+
  35. | *Default* | ``false`` |
  36. +-----------+---------------------------------+
  37. | *Setter* | set_collide_with_areas(value) |
  38. +-----------+---------------------------------+
  39. | *Getter* | is_collide_with_areas_enabled() |
  40. +-----------+---------------------------------+
  41. If ``true``, the query will take :ref:`Area2D<class_Area2D>`\ s into account.
  42. ----
  43. .. _class_PhysicsRayQueryParameters2D_property_collide_with_bodies:
  44. - :ref:`bool<class_bool>` **collide_with_bodies**
  45. +-----------+----------------------------------+
  46. | *Default* | ``true`` |
  47. +-----------+----------------------------------+
  48. | *Setter* | set_collide_with_bodies(value) |
  49. +-----------+----------------------------------+
  50. | *Getter* | is_collide_with_bodies_enabled() |
  51. +-----------+----------------------------------+
  52. If ``true``, the query will take :ref:`PhysicsBody2D<class_PhysicsBody2D>`\ s into account.
  53. ----
  54. .. _class_PhysicsRayQueryParameters2D_property_collision_mask:
  55. - :ref:`int<class_int>` **collision_mask**
  56. +-----------+---------------------------+
  57. | *Default* | ``4294967295`` |
  58. +-----------+---------------------------+
  59. | *Setter* | set_collision_mask(value) |
  60. +-----------+---------------------------+
  61. | *Getter* | get_collision_mask() |
  62. +-----------+---------------------------+
  63. The physics layers the query will detect (as a bitmask). By default, all collision layers are detected. See `Collision layers and masks <../tutorials/physics/physics_introduction.html#collision-layers-and-masks>`__ in the documentation for more information.
  64. ----
  65. .. _class_PhysicsRayQueryParameters2D_property_exclude:
  66. - :ref:`Array<class_Array>` **exclude**
  67. +-----------+--------------------+
  68. | *Default* | ``[]`` |
  69. +-----------+--------------------+
  70. | *Setter* | set_exclude(value) |
  71. +-----------+--------------------+
  72. | *Getter* | get_exclude() |
  73. +-----------+--------------------+
  74. The list of objects or object :ref:`RID<class_RID>`\ s that will be excluded from collisions.
  75. ----
  76. .. _class_PhysicsRayQueryParameters2D_property_from:
  77. - :ref:`Vector2<class_Vector2>` **from**
  78. +-----------+-------------------+
  79. | *Default* | ``Vector2(0, 0)`` |
  80. +-----------+-------------------+
  81. | *Setter* | set_from(value) |
  82. +-----------+-------------------+
  83. | *Getter* | get_from() |
  84. +-----------+-------------------+
  85. The starting point of the ray being queried for, in global coordinates.
  86. ----
  87. .. _class_PhysicsRayQueryParameters2D_property_hit_from_inside:
  88. - :ref:`bool<class_bool>` **hit_from_inside**
  89. +-----------+------------------------------+
  90. | *Default* | ``false`` |
  91. +-----------+------------------------------+
  92. | *Setter* | set_hit_from_inside(value) |
  93. +-----------+------------------------------+
  94. | *Getter* | is_hit_from_inside_enabled() |
  95. +-----------+------------------------------+
  96. If ``true``, the query will detect a hit when starting inside shapes. In this case the collision normal will be ``Vector2(0, 0)``. Does not affect concave polygon shapes.
  97. ----
  98. .. _class_PhysicsRayQueryParameters2D_property_to:
  99. - :ref:`Vector2<class_Vector2>` **to**
  100. +-----------+-------------------+
  101. | *Default* | ``Vector2(0, 0)`` |
  102. +-----------+-------------------+
  103. | *Setter* | set_to(value) |
  104. +-----------+-------------------+
  105. | *Getter* | get_to() |
  106. +-----------+-------------------+
  107. The ending point of the ray being queried for, in global coordinates.
  108. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
  109. .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
  110. .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
  111. .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
  112. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
  113. .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`