class_shapecast3d.rst 27 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536
  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/ShapeCast3D.xml.
  6. .. _class_ShapeCast3D:
  7. ShapeCast3D
  8. ===========
  9. **Inherits:** :ref:`Node3D<class_Node3D>` **<** :ref:`Node<class_Node>` **<** :ref:`Object<class_Object>`
  10. A 3D shape that sweeps a region of space to detect :ref:`CollisionObject3D<class_CollisionObject3D>`\ s.
  11. .. rst-class:: classref-introduction-group
  12. Description
  13. -----------
  14. Shape casting allows to detect collision objects by sweeping its :ref:`shape<class_ShapeCast3D_property_shape>` along the cast direction determined by :ref:`target_position<class_ShapeCast3D_property_target_position>`. This is similar to :ref:`RayCast3D<class_RayCast3D>`, but it allows for sweeping a region of space, rather than just a straight line. **ShapeCast3D** can detect multiple collision objects. It is useful for things like wide laser beams or snapping a simple shape to a floor.
  15. Immediate collision overlaps can be done with the :ref:`target_position<class_ShapeCast3D_property_target_position>` set to ``Vector3(0, 0, 0)`` and by calling :ref:`force_shapecast_update<class_ShapeCast3D_method_force_shapecast_update>` within the same physics frame. This helps to overcome some limitations of :ref:`Area3D<class_Area3D>` when used as an instantaneous detection area, as collision information isn't immediately available to it.
  16. \ **Note:** Shape casting is more computationally expensive than ray casting.
  17. .. rst-class:: classref-reftable-group
  18. Properties
  19. ----------
  20. .. table::
  21. :widths: auto
  22. +-------------------------------+--------------------------------------------------------------------------------------+-----------------------+
  23. | :ref:`bool<class_bool>` | :ref:`collide_with_areas<class_ShapeCast3D_property_collide_with_areas>` | ``false`` |
  24. +-------------------------------+--------------------------------------------------------------------------------------+-----------------------+
  25. | :ref:`bool<class_bool>` | :ref:`collide_with_bodies<class_ShapeCast3D_property_collide_with_bodies>` | ``true`` |
  26. +-------------------------------+--------------------------------------------------------------------------------------+-----------------------+
  27. | :ref:`int<class_int>` | :ref:`collision_mask<class_ShapeCast3D_property_collision_mask>` | ``1`` |
  28. +-------------------------------+--------------------------------------------------------------------------------------+-----------------------+
  29. | :ref:`Array<class_Array>` | :ref:`collision_result<class_ShapeCast3D_property_collision_result>` | ``[]`` |
  30. +-------------------------------+--------------------------------------------------------------------------------------+-----------------------+
  31. | :ref:`Color<class_Color>` | :ref:`debug_shape_custom_color<class_ShapeCast3D_property_debug_shape_custom_color>` | ``Color(0, 0, 0, 1)`` |
  32. +-------------------------------+--------------------------------------------------------------------------------------+-----------------------+
  33. | :ref:`bool<class_bool>` | :ref:`enabled<class_ShapeCast3D_property_enabled>` | ``true`` |
  34. +-------------------------------+--------------------------------------------------------------------------------------+-----------------------+
  35. | :ref:`bool<class_bool>` | :ref:`exclude_parent<class_ShapeCast3D_property_exclude_parent>` | ``true`` |
  36. +-------------------------------+--------------------------------------------------------------------------------------+-----------------------+
  37. | :ref:`float<class_float>` | :ref:`margin<class_ShapeCast3D_property_margin>` | ``0.0`` |
  38. +-------------------------------+--------------------------------------------------------------------------------------+-----------------------+
  39. | :ref:`int<class_int>` | :ref:`max_results<class_ShapeCast3D_property_max_results>` | ``32`` |
  40. +-------------------------------+--------------------------------------------------------------------------------------+-----------------------+
  41. | :ref:`Shape3D<class_Shape3D>` | :ref:`shape<class_ShapeCast3D_property_shape>` | |
  42. +-------------------------------+--------------------------------------------------------------------------------------+-----------------------+
  43. | :ref:`Vector3<class_Vector3>` | :ref:`target_position<class_ShapeCast3D_property_target_position>` | ``Vector3(0, -1, 0)`` |
  44. +-------------------------------+--------------------------------------------------------------------------------------+-----------------------+
  45. .. rst-class:: classref-reftable-group
  46. Methods
  47. -------
  48. .. table::
  49. :widths: auto
  50. +-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------+
  51. | |void| | :ref:`add_exception<class_ShapeCast3D_method_add_exception>`\ (\ node\: :ref:`CollisionObject3D<class_CollisionObject3D>`\ ) |
  52. +-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------+
  53. | |void| | :ref:`add_exception_rid<class_ShapeCast3D_method_add_exception_rid>`\ (\ rid\: :ref:`RID<class_RID>`\ ) |
  54. +-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------+
  55. | |void| | :ref:`clear_exceptions<class_ShapeCast3D_method_clear_exceptions>`\ (\ ) |
  56. +-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------+
  57. | |void| | :ref:`force_shapecast_update<class_ShapeCast3D_method_force_shapecast_update>`\ (\ ) |
  58. +-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------+
  59. | :ref:`float<class_float>` | :ref:`get_closest_collision_safe_fraction<class_ShapeCast3D_method_get_closest_collision_safe_fraction>`\ (\ ) |const| |
  60. +-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------+
  61. | :ref:`float<class_float>` | :ref:`get_closest_collision_unsafe_fraction<class_ShapeCast3D_method_get_closest_collision_unsafe_fraction>`\ (\ ) |const| |
  62. +-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------+
  63. | :ref:`Object<class_Object>` | :ref:`get_collider<class_ShapeCast3D_method_get_collider>`\ (\ index\: :ref:`int<class_int>`\ ) |const| |
  64. +-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------+
  65. | :ref:`RID<class_RID>` | :ref:`get_collider_rid<class_ShapeCast3D_method_get_collider_rid>`\ (\ index\: :ref:`int<class_int>`\ ) |const| |
  66. +-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------+
  67. | :ref:`int<class_int>` | :ref:`get_collider_shape<class_ShapeCast3D_method_get_collider_shape>`\ (\ index\: :ref:`int<class_int>`\ ) |const| |
  68. +-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------+
  69. | :ref:`int<class_int>` | :ref:`get_collision_count<class_ShapeCast3D_method_get_collision_count>`\ (\ ) |const| |
  70. +-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------+
  71. | :ref:`bool<class_bool>` | :ref:`get_collision_mask_value<class_ShapeCast3D_method_get_collision_mask_value>`\ (\ layer_number\: :ref:`int<class_int>`\ ) |const| |
  72. +-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------+
  73. | :ref:`Vector3<class_Vector3>` | :ref:`get_collision_normal<class_ShapeCast3D_method_get_collision_normal>`\ (\ index\: :ref:`int<class_int>`\ ) |const| |
  74. +-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------+
  75. | :ref:`Vector3<class_Vector3>` | :ref:`get_collision_point<class_ShapeCast3D_method_get_collision_point>`\ (\ index\: :ref:`int<class_int>`\ ) |const| |
  76. +-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------+
  77. | :ref:`bool<class_bool>` | :ref:`is_colliding<class_ShapeCast3D_method_is_colliding>`\ (\ ) |const| |
  78. +-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------+
  79. | |void| | :ref:`remove_exception<class_ShapeCast3D_method_remove_exception>`\ (\ node\: :ref:`CollisionObject3D<class_CollisionObject3D>`\ ) |
  80. +-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------+
  81. | |void| | :ref:`remove_exception_rid<class_ShapeCast3D_method_remove_exception_rid>`\ (\ rid\: :ref:`RID<class_RID>`\ ) |
  82. +-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------+
  83. | |void| | :ref:`resource_changed<class_ShapeCast3D_method_resource_changed>`\ (\ resource\: :ref:`Resource<class_Resource>`\ ) |
  84. +-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------+
  85. | |void| | :ref:`set_collision_mask_value<class_ShapeCast3D_method_set_collision_mask_value>`\ (\ layer_number\: :ref:`int<class_int>`, value\: :ref:`bool<class_bool>`\ ) |
  86. +-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------+
  87. .. rst-class:: classref-section-separator
  88. ----
  89. .. rst-class:: classref-descriptions-group
  90. Property Descriptions
  91. ---------------------
  92. .. _class_ShapeCast3D_property_collide_with_areas:
  93. .. rst-class:: classref-property
  94. :ref:`bool<class_bool>` **collide_with_areas** = ``false`` :ref:`🔗<class_ShapeCast3D_property_collide_with_areas>`
  95. .. rst-class:: classref-property-setget
  96. - |void| **set_collide_with_areas**\ (\ value\: :ref:`bool<class_bool>`\ )
  97. - :ref:`bool<class_bool>` **is_collide_with_areas_enabled**\ (\ )
  98. If ``true``, collisions with :ref:`Area3D<class_Area3D>`\ s will be reported.
  99. .. rst-class:: classref-item-separator
  100. ----
  101. .. _class_ShapeCast3D_property_collide_with_bodies:
  102. .. rst-class:: classref-property
  103. :ref:`bool<class_bool>` **collide_with_bodies** = ``true`` :ref:`🔗<class_ShapeCast3D_property_collide_with_bodies>`
  104. .. rst-class:: classref-property-setget
  105. - |void| **set_collide_with_bodies**\ (\ value\: :ref:`bool<class_bool>`\ )
  106. - :ref:`bool<class_bool>` **is_collide_with_bodies_enabled**\ (\ )
  107. If ``true``, collisions with :ref:`PhysicsBody3D<class_PhysicsBody3D>`\ s will be reported.
  108. .. rst-class:: classref-item-separator
  109. ----
  110. .. _class_ShapeCast3D_property_collision_mask:
  111. .. rst-class:: classref-property
  112. :ref:`int<class_int>` **collision_mask** = ``1`` :ref:`🔗<class_ShapeCast3D_property_collision_mask>`
  113. .. rst-class:: classref-property-setget
  114. - |void| **set_collision_mask**\ (\ value\: :ref:`int<class_int>`\ )
  115. - :ref:`int<class_int>` **get_collision_mask**\ (\ )
  116. The shape's collision mask. Only objects in at least one collision layer enabled in the mask will be detected. See `Collision layers and masks <../tutorials/physics/physics_introduction.html#collision-layers-and-masks>`__ in the documentation for more information.
  117. .. rst-class:: classref-item-separator
  118. ----
  119. .. _class_ShapeCast3D_property_collision_result:
  120. .. rst-class:: classref-property
  121. :ref:`Array<class_Array>` **collision_result** = ``[]`` :ref:`🔗<class_ShapeCast3D_property_collision_result>`
  122. .. rst-class:: classref-property-setget
  123. - :ref:`Array<class_Array>` **get_collision_result**\ (\ )
  124. Returns the complete collision information from the collision sweep. The data returned is the same as in the :ref:`PhysicsDirectSpaceState3D.get_rest_info<class_PhysicsDirectSpaceState3D_method_get_rest_info>` method.
  125. .. rst-class:: classref-item-separator
  126. ----
  127. .. _class_ShapeCast3D_property_debug_shape_custom_color:
  128. .. rst-class:: classref-property
  129. :ref:`Color<class_Color>` **debug_shape_custom_color** = ``Color(0, 0, 0, 1)`` :ref:`🔗<class_ShapeCast3D_property_debug_shape_custom_color>`
  130. .. rst-class:: classref-property-setget
  131. - |void| **set_debug_shape_custom_color**\ (\ value\: :ref:`Color<class_Color>`\ )
  132. - :ref:`Color<class_Color>` **get_debug_shape_custom_color**\ (\ )
  133. The custom color to use to draw the shape in the editor and at run-time if **Visible Collision Shapes** is enabled in the **Debug** menu. This color will be highlighted at run-time if the **ShapeCast3D** is colliding with something.
  134. If set to ``Color(0.0, 0.0, 0.0)`` (by default), the color set in :ref:`ProjectSettings.debug/shapes/collision/shape_color<class_ProjectSettings_property_debug/shapes/collision/shape_color>` is used.
  135. .. rst-class:: classref-item-separator
  136. ----
  137. .. _class_ShapeCast3D_property_enabled:
  138. .. rst-class:: classref-property
  139. :ref:`bool<class_bool>` **enabled** = ``true`` :ref:`🔗<class_ShapeCast3D_property_enabled>`
  140. .. rst-class:: classref-property-setget
  141. - |void| **set_enabled**\ (\ value\: :ref:`bool<class_bool>`\ )
  142. - :ref:`bool<class_bool>` **is_enabled**\ (\ )
  143. If ``true``, collisions will be reported.
  144. .. rst-class:: classref-item-separator
  145. ----
  146. .. _class_ShapeCast3D_property_exclude_parent:
  147. .. rst-class:: classref-property
  148. :ref:`bool<class_bool>` **exclude_parent** = ``true`` :ref:`🔗<class_ShapeCast3D_property_exclude_parent>`
  149. .. rst-class:: classref-property-setget
  150. - |void| **set_exclude_parent_body**\ (\ value\: :ref:`bool<class_bool>`\ )
  151. - :ref:`bool<class_bool>` **get_exclude_parent_body**\ (\ )
  152. If ``true``, the parent node will be excluded from collision detection.
  153. .. rst-class:: classref-item-separator
  154. ----
  155. .. _class_ShapeCast3D_property_margin:
  156. .. rst-class:: classref-property
  157. :ref:`float<class_float>` **margin** = ``0.0`` :ref:`🔗<class_ShapeCast3D_property_margin>`
  158. .. rst-class:: classref-property-setget
  159. - |void| **set_margin**\ (\ value\: :ref:`float<class_float>`\ )
  160. - :ref:`float<class_float>` **get_margin**\ (\ )
  161. The collision margin for the shape. A larger margin helps detecting collisions more consistently, at the cost of precision.
  162. .. rst-class:: classref-item-separator
  163. ----
  164. .. _class_ShapeCast3D_property_max_results:
  165. .. rst-class:: classref-property
  166. :ref:`int<class_int>` **max_results** = ``32`` :ref:`🔗<class_ShapeCast3D_property_max_results>`
  167. .. rst-class:: classref-property-setget
  168. - |void| **set_max_results**\ (\ value\: :ref:`int<class_int>`\ )
  169. - :ref:`int<class_int>` **get_max_results**\ (\ )
  170. The number of intersections can be limited with this parameter, to reduce the processing time.
  171. .. rst-class:: classref-item-separator
  172. ----
  173. .. _class_ShapeCast3D_property_shape:
  174. .. rst-class:: classref-property
  175. :ref:`Shape3D<class_Shape3D>` **shape** :ref:`🔗<class_ShapeCast3D_property_shape>`
  176. .. rst-class:: classref-property-setget
  177. - |void| **set_shape**\ (\ value\: :ref:`Shape3D<class_Shape3D>`\ )
  178. - :ref:`Shape3D<class_Shape3D>` **get_shape**\ (\ )
  179. The shape to be used for collision queries.
  180. .. rst-class:: classref-item-separator
  181. ----
  182. .. _class_ShapeCast3D_property_target_position:
  183. .. rst-class:: classref-property
  184. :ref:`Vector3<class_Vector3>` **target_position** = ``Vector3(0, -1, 0)`` :ref:`🔗<class_ShapeCast3D_property_target_position>`
  185. .. rst-class:: classref-property-setget
  186. - |void| **set_target_position**\ (\ value\: :ref:`Vector3<class_Vector3>`\ )
  187. - :ref:`Vector3<class_Vector3>` **get_target_position**\ (\ )
  188. The shape's destination point, relative to this node's :ref:`Node3D.position<class_Node3D_property_position>`.
  189. .. rst-class:: classref-section-separator
  190. ----
  191. .. rst-class:: classref-descriptions-group
  192. Method Descriptions
  193. -------------------
  194. .. _class_ShapeCast3D_method_add_exception:
  195. .. rst-class:: classref-method
  196. |void| **add_exception**\ (\ node\: :ref:`CollisionObject3D<class_CollisionObject3D>`\ ) :ref:`🔗<class_ShapeCast3D_method_add_exception>`
  197. Adds a collision exception so the shape does not report collisions with the specified node.
  198. .. rst-class:: classref-item-separator
  199. ----
  200. .. _class_ShapeCast3D_method_add_exception_rid:
  201. .. rst-class:: classref-method
  202. |void| **add_exception_rid**\ (\ rid\: :ref:`RID<class_RID>`\ ) :ref:`🔗<class_ShapeCast3D_method_add_exception_rid>`
  203. Adds a collision exception so the shape does not report collisions with the specified :ref:`RID<class_RID>`.
  204. .. rst-class:: classref-item-separator
  205. ----
  206. .. _class_ShapeCast3D_method_clear_exceptions:
  207. .. rst-class:: classref-method
  208. |void| **clear_exceptions**\ (\ ) :ref:`🔗<class_ShapeCast3D_method_clear_exceptions>`
  209. Removes all collision exceptions for this shape.
  210. .. rst-class:: classref-item-separator
  211. ----
  212. .. _class_ShapeCast3D_method_force_shapecast_update:
  213. .. rst-class:: classref-method
  214. |void| **force_shapecast_update**\ (\ ) :ref:`🔗<class_ShapeCast3D_method_force_shapecast_update>`
  215. Updates the collision information for the shape immediately, without waiting for the next ``_physics_process`` call. Use this method, for example, when the shape or its parent has changed state.
  216. \ **Note:** Setting :ref:`enabled<class_ShapeCast3D_property_enabled>` to ``true`` is not required for this to work.
  217. .. rst-class:: classref-item-separator
  218. ----
  219. .. _class_ShapeCast3D_method_get_closest_collision_safe_fraction:
  220. .. rst-class:: classref-method
  221. :ref:`float<class_float>` **get_closest_collision_safe_fraction**\ (\ ) |const| :ref:`🔗<class_ShapeCast3D_method_get_closest_collision_safe_fraction>`
  222. Returns the fraction from this cast's origin to its :ref:`target_position<class_ShapeCast3D_property_target_position>` of how far the shape can move without triggering a collision, as a value between ``0.0`` and ``1.0``.
  223. .. rst-class:: classref-item-separator
  224. ----
  225. .. _class_ShapeCast3D_method_get_closest_collision_unsafe_fraction:
  226. .. rst-class:: classref-method
  227. :ref:`float<class_float>` **get_closest_collision_unsafe_fraction**\ (\ ) |const| :ref:`🔗<class_ShapeCast3D_method_get_closest_collision_unsafe_fraction>`
  228. Returns the fraction from this cast's origin to its :ref:`target_position<class_ShapeCast3D_property_target_position>` of how far the shape must move to trigger a collision, as a value between ``0.0`` and ``1.0``.
  229. In ideal conditions this would be the same as :ref:`get_closest_collision_safe_fraction<class_ShapeCast3D_method_get_closest_collision_safe_fraction>`, however shape casting is calculated in discrete steps, so the precise point of collision can occur between two calculated positions.
  230. .. rst-class:: classref-item-separator
  231. ----
  232. .. _class_ShapeCast3D_method_get_collider:
  233. .. rst-class:: classref-method
  234. :ref:`Object<class_Object>` **get_collider**\ (\ index\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_ShapeCast3D_method_get_collider>`
  235. Returns the collided :ref:`Object<class_Object>` of one of the multiple collisions at ``index``, or ``null`` if no object is intersecting the shape (i.e. :ref:`is_colliding<class_ShapeCast3D_method_is_colliding>` returns ``false``).
  236. .. rst-class:: classref-item-separator
  237. ----
  238. .. _class_ShapeCast3D_method_get_collider_rid:
  239. .. rst-class:: classref-method
  240. :ref:`RID<class_RID>` **get_collider_rid**\ (\ index\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_ShapeCast3D_method_get_collider_rid>`
  241. Returns the :ref:`RID<class_RID>` of the collided object of one of the multiple collisions at ``index``.
  242. .. rst-class:: classref-item-separator
  243. ----
  244. .. _class_ShapeCast3D_method_get_collider_shape:
  245. .. rst-class:: classref-method
  246. :ref:`int<class_int>` **get_collider_shape**\ (\ index\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_ShapeCast3D_method_get_collider_shape>`
  247. Returns the shape ID of the colliding shape of one of the multiple collisions at ``index``, or ``0`` if no object is intersecting the shape (i.e. :ref:`is_colliding<class_ShapeCast3D_method_is_colliding>` returns ``false``).
  248. .. rst-class:: classref-item-separator
  249. ----
  250. .. _class_ShapeCast3D_method_get_collision_count:
  251. .. rst-class:: classref-method
  252. :ref:`int<class_int>` **get_collision_count**\ (\ ) |const| :ref:`🔗<class_ShapeCast3D_method_get_collision_count>`
  253. The number of collisions detected at the point of impact. Use this to iterate over multiple collisions as provided by :ref:`get_collider<class_ShapeCast3D_method_get_collider>`, :ref:`get_collider_shape<class_ShapeCast3D_method_get_collider_shape>`, :ref:`get_collision_point<class_ShapeCast3D_method_get_collision_point>`, and :ref:`get_collision_normal<class_ShapeCast3D_method_get_collision_normal>` methods.
  254. .. rst-class:: classref-item-separator
  255. ----
  256. .. _class_ShapeCast3D_method_get_collision_mask_value:
  257. .. rst-class:: classref-method
  258. :ref:`bool<class_bool>` **get_collision_mask_value**\ (\ layer_number\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_ShapeCast3D_method_get_collision_mask_value>`
  259. Returns whether or not the specified layer of the :ref:`collision_mask<class_ShapeCast3D_property_collision_mask>` is enabled, given a ``layer_number`` between 1 and 32.
  260. .. rst-class:: classref-item-separator
  261. ----
  262. .. _class_ShapeCast3D_method_get_collision_normal:
  263. .. rst-class:: classref-method
  264. :ref:`Vector3<class_Vector3>` **get_collision_normal**\ (\ index\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_ShapeCast3D_method_get_collision_normal>`
  265. Returns the normal of one of the multiple collisions at ``index`` of the intersecting object.
  266. .. rst-class:: classref-item-separator
  267. ----
  268. .. _class_ShapeCast3D_method_get_collision_point:
  269. .. rst-class:: classref-method
  270. :ref:`Vector3<class_Vector3>` **get_collision_point**\ (\ index\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_ShapeCast3D_method_get_collision_point>`
  271. Returns the collision point of one of the multiple collisions at ``index`` where the shape intersects the colliding object.
  272. \ **Note:** This point is in the **global** coordinate system.
  273. .. rst-class:: classref-item-separator
  274. ----
  275. .. _class_ShapeCast3D_method_is_colliding:
  276. .. rst-class:: classref-method
  277. :ref:`bool<class_bool>` **is_colliding**\ (\ ) |const| :ref:`🔗<class_ShapeCast3D_method_is_colliding>`
  278. Returns whether any object is intersecting with the shape's vector (considering the vector length).
  279. .. rst-class:: classref-item-separator
  280. ----
  281. .. _class_ShapeCast3D_method_remove_exception:
  282. .. rst-class:: classref-method
  283. |void| **remove_exception**\ (\ node\: :ref:`CollisionObject3D<class_CollisionObject3D>`\ ) :ref:`🔗<class_ShapeCast3D_method_remove_exception>`
  284. Removes a collision exception so the shape does report collisions with the specified node.
  285. .. rst-class:: classref-item-separator
  286. ----
  287. .. _class_ShapeCast3D_method_remove_exception_rid:
  288. .. rst-class:: classref-method
  289. |void| **remove_exception_rid**\ (\ rid\: :ref:`RID<class_RID>`\ ) :ref:`🔗<class_ShapeCast3D_method_remove_exception_rid>`
  290. Removes a collision exception so the shape does report collisions with the specified :ref:`RID<class_RID>`.
  291. .. rst-class:: classref-item-separator
  292. ----
  293. .. _class_ShapeCast3D_method_resource_changed:
  294. .. rst-class:: classref-method
  295. |void| **resource_changed**\ (\ resource\: :ref:`Resource<class_Resource>`\ ) :ref:`🔗<class_ShapeCast3D_method_resource_changed>`
  296. **Deprecated:** Use :ref:`Resource.changed<class_Resource_signal_changed>` instead.
  297. This method does nothing.
  298. .. rst-class:: classref-item-separator
  299. ----
  300. .. _class_ShapeCast3D_method_set_collision_mask_value:
  301. .. rst-class:: classref-method
  302. |void| **set_collision_mask_value**\ (\ layer_number\: :ref:`int<class_int>`, value\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_ShapeCast3D_method_set_collision_mask_value>`
  303. Based on ``value``, enables or disables the specified layer in the :ref:`collision_mask<class_ShapeCast3D_property_collision_mask>`, given a ``layer_number`` between 1 and 32.
  304. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
  305. .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
  306. .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
  307. .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
  308. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
  309. .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`
  310. .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)`
  311. .. |void| replace:: :abbr:`void (No return value.)`