class_raycast2d.rst 7.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138
  1. .. Generated automatically by doc/tools/makerst.py in Godot's source tree.
  2. .. DO NOT EDIT THIS FILE, but the doc/base/classes.xml source instead.
  3. .. _class_RayCast2D:
  4. RayCast2D
  5. =========
  6. **Inherits:** :ref:`Node2D<class_node2d>` **<** :ref:`CanvasItem<class_canvasitem>` **<** :ref:`Node<class_node>` **<** :ref:`Object<class_object>`
  7. **Category:** Core
  8. Brief Description
  9. -----------------
  10. Member Functions
  11. ----------------
  12. +--------------------------------+-----------------------------------------------------------------------------------------------------------+
  13. | void | :ref:`set_enabled<class_RayCast2D_set_enabled>` **(** :ref:`bool<class_bool>` enabled **)** |
  14. +--------------------------------+-----------------------------------------------------------------------------------------------------------+
  15. | :ref:`bool<class_bool>` | :ref:`is_enabled<class_RayCast2D_is_enabled>` **(** **)** const |
  16. +--------------------------------+-----------------------------------------------------------------------------------------------------------+
  17. | void | :ref:`set_cast_to<class_RayCast2D_set_cast_to>` **(** :ref:`Vector2<class_vector2>` local_point **)** |
  18. +--------------------------------+-----------------------------------------------------------------------------------------------------------+
  19. | :ref:`Vector2<class_vector2>` | :ref:`get_cast_to<class_RayCast2D_get_cast_to>` **(** **)** const |
  20. +--------------------------------+-----------------------------------------------------------------------------------------------------------+
  21. | :ref:`bool<class_bool>` | :ref:`is_colliding<class_RayCast2D_is_colliding>` **(** **)** const |
  22. +--------------------------------+-----------------------------------------------------------------------------------------------------------+
  23. | :ref:`Object<class_object>` | :ref:`get_collider<class_RayCast2D_get_collider>` **(** **)** const |
  24. +--------------------------------+-----------------------------------------------------------------------------------------------------------+
  25. | :ref:`int<class_int>` | :ref:`get_collider_shape<class_RayCast2D_get_collider_shape>` **(** **)** const |
  26. +--------------------------------+-----------------------------------------------------------------------------------------------------------+
  27. | :ref:`Vector2<class_vector2>` | :ref:`get_collision_point<class_RayCast2D_get_collision_point>` **(** **)** const |
  28. +--------------------------------+-----------------------------------------------------------------------------------------------------------+
  29. | :ref:`Vector2<class_vector2>` | :ref:`get_collision_normal<class_RayCast2D_get_collision_normal>` **(** **)** const |
  30. +--------------------------------+-----------------------------------------------------------------------------------------------------------+
  31. | void | :ref:`add_exception_rid<class_RayCast2D_add_exception_rid>` **(** :ref:`RID<class_rid>` rid **)** |
  32. +--------------------------------+-----------------------------------------------------------------------------------------------------------+
  33. | void | :ref:`add_exception<class_RayCast2D_add_exception>` **(** :ref:`Object<class_object>` node **)** |
  34. +--------------------------------+-----------------------------------------------------------------------------------------------------------+
  35. | void | :ref:`remove_exception_rid<class_RayCast2D_remove_exception_rid>` **(** :ref:`RID<class_rid>` rid **)** |
  36. +--------------------------------+-----------------------------------------------------------------------------------------------------------+
  37. | void | :ref:`remove_exception<class_RayCast2D_remove_exception>` **(** :ref:`Object<class_object>` node **)** |
  38. +--------------------------------+-----------------------------------------------------------------------------------------------------------+
  39. | void | :ref:`clear_exceptions<class_RayCast2D_clear_exceptions>` **(** **)** |
  40. +--------------------------------+-----------------------------------------------------------------------------------------------------------+
  41. | void | :ref:`set_layer_mask<class_RayCast2D_set_layer_mask>` **(** :ref:`int<class_int>` mask **)** |
  42. +--------------------------------+-----------------------------------------------------------------------------------------------------------+
  43. | :ref:`int<class_int>` | :ref:`get_layer_mask<class_RayCast2D_get_layer_mask>` **(** **)** const |
  44. +--------------------------------+-----------------------------------------------------------------------------------------------------------+
  45. | void | :ref:`set_type_mask<class_RayCast2D_set_type_mask>` **(** :ref:`int<class_int>` mask **)** |
  46. +--------------------------------+-----------------------------------------------------------------------------------------------------------+
  47. | :ref:`int<class_int>` | :ref:`get_type_mask<class_RayCast2D_get_type_mask>` **(** **)** const |
  48. +--------------------------------+-----------------------------------------------------------------------------------------------------------+
  49. Member Function Description
  50. ---------------------------
  51. .. _class_RayCast2D_set_enabled:
  52. - void **set_enabled** **(** :ref:`bool<class_bool>` enabled **)**
  53. .. _class_RayCast2D_is_enabled:
  54. - :ref:`bool<class_bool>` **is_enabled** **(** **)** const
  55. .. _class_RayCast2D_set_cast_to:
  56. - void **set_cast_to** **(** :ref:`Vector2<class_vector2>` local_point **)**
  57. .. _class_RayCast2D_get_cast_to:
  58. - :ref:`Vector2<class_vector2>` **get_cast_to** **(** **)** const
  59. .. _class_RayCast2D_is_colliding:
  60. - :ref:`bool<class_bool>` **is_colliding** **(** **)** const
  61. Return whether the closest object the ray is pointing to is colliding with the vector, with the vector length considered.
  62. .. _class_RayCast2D_get_collider:
  63. - :ref:`Object<class_object>` **get_collider** **(** **)** const
  64. Return the closest object the ray is pointing to. Note that this does not consider the length of the vector, so you must also use :ref:`is_colliding<class_RayCast2D_is_colliding>` to check if the object returned is actually colliding with the ray.
  65. .. _class_RayCast2D_get_collider_shape:
  66. - :ref:`int<class_int>` **get_collider_shape** **(** **)** const
  67. .. _class_RayCast2D_get_collision_point:
  68. - :ref:`Vector2<class_vector2>` **get_collision_point** **(** **)** const
  69. .. _class_RayCast2D_get_collision_normal:
  70. - :ref:`Vector2<class_vector2>` **get_collision_normal** **(** **)** const
  71. .. _class_RayCast2D_add_exception_rid:
  72. - void **add_exception_rid** **(** :ref:`RID<class_rid>` rid **)**
  73. .. _class_RayCast2D_add_exception:
  74. - void **add_exception** **(** :ref:`Object<class_object>` node **)**
  75. .. _class_RayCast2D_remove_exception_rid:
  76. - void **remove_exception_rid** **(** :ref:`RID<class_rid>` rid **)**
  77. .. _class_RayCast2D_remove_exception:
  78. - void **remove_exception** **(** :ref:`Object<class_object>` node **)**
  79. .. _class_RayCast2D_clear_exceptions:
  80. - void **clear_exceptions** **(** **)**
  81. .. _class_RayCast2D_set_layer_mask:
  82. - void **set_layer_mask** **(** :ref:`int<class_int>` mask **)**
  83. .. _class_RayCast2D_get_layer_mask:
  84. - :ref:`int<class_int>` **get_layer_mask** **(** **)** const
  85. .. _class_RayCast2D_set_type_mask:
  86. - void **set_type_mask** **(** :ref:`int<class_int>` mask **)**
  87. .. _class_RayCast2D_get_type_mask:
  88. - :ref:`int<class_int>` **get_type_mask** **(** **)** const