class_physicsrayqueryparameters2d.rst 7.2 KB

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