class_area3d.rst 34 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786
  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/Area3D.xml.
  6. .. _class_Area3D:
  7. Area3D
  8. ======
  9. **Inherits:** :ref:`CollisionObject3D<class_CollisionObject3D>` **<** :ref:`Node3D<class_Node3D>` **<** :ref:`Node<class_Node>` **<** :ref:`Object<class_Object>`
  10. 3D area for detection and physics and audio influence.
  11. .. rst-class:: classref-introduction-group
  12. Description
  13. -----------
  14. 3D area that detects :ref:`CollisionObject3D<class_CollisionObject3D>` nodes overlapping, entering, or exiting. Can also alter or override local physics parameters (gravity, damping) and route audio to custom audio buses.
  15. To give the area its shape, add a :ref:`CollisionShape3D<class_CollisionShape3D>` or a :ref:`CollisionPolygon3D<class_CollisionPolygon3D>` node as a *direct* child (or add multiple such nodes as direct children) of the area.
  16. \ **Warning:** See :ref:`ConcavePolygonShape3D<class_ConcavePolygonShape3D>` (also called "trimesh") for a warning about possibly unexpected behavior when using that shape for an area.
  17. .. rst-class:: classref-introduction-group
  18. Tutorials
  19. ---------
  20. - `3D Platformer Demo <https://godotengine.org/asset-library/asset/125>`__
  21. - `GUI in 3D Demo <https://godotengine.org/asset-library/asset/127>`__
  22. .. rst-class:: classref-reftable-group
  23. Properties
  24. ----------
  25. .. table::
  26. :widths: auto
  27. +-------------------------------------------------+-----------------------------------------------------------------------------------------+-----------------------+
  28. | :ref:`float<class_float>` | :ref:`angular_damp<class_Area3D_property_angular_damp>` | ``0.1`` |
  29. +-------------------------------------------------+-----------------------------------------------------------------------------------------+-----------------------+
  30. | :ref:`SpaceOverride<enum_Area3D_SpaceOverride>` | :ref:`angular_damp_space_override<class_Area3D_property_angular_damp_space_override>` | ``0`` |
  31. +-------------------------------------------------+-----------------------------------------------------------------------------------------+-----------------------+
  32. | :ref:`StringName<class_StringName>` | :ref:`audio_bus_name<class_Area3D_property_audio_bus_name>` | ``&"Master"`` |
  33. +-------------------------------------------------+-----------------------------------------------------------------------------------------+-----------------------+
  34. | :ref:`bool<class_bool>` | :ref:`audio_bus_override<class_Area3D_property_audio_bus_override>` | ``false`` |
  35. +-------------------------------------------------+-----------------------------------------------------------------------------------------+-----------------------+
  36. | :ref:`float<class_float>` | :ref:`gravity<class_Area3D_property_gravity>` | ``9.8`` |
  37. +-------------------------------------------------+-----------------------------------------------------------------------------------------+-----------------------+
  38. | :ref:`Vector3<class_Vector3>` | :ref:`gravity_direction<class_Area3D_property_gravity_direction>` | ``Vector3(0, -1, 0)`` |
  39. +-------------------------------------------------+-----------------------------------------------------------------------------------------+-----------------------+
  40. | :ref:`bool<class_bool>` | :ref:`gravity_point<class_Area3D_property_gravity_point>` | ``false`` |
  41. +-------------------------------------------------+-----------------------------------------------------------------------------------------+-----------------------+
  42. | :ref:`Vector3<class_Vector3>` | :ref:`gravity_point_center<class_Area3D_property_gravity_point_center>` | ``Vector3(0, -1, 0)`` |
  43. +-------------------------------------------------+-----------------------------------------------------------------------------------------+-----------------------+
  44. | :ref:`float<class_float>` | :ref:`gravity_point_distance_scale<class_Area3D_property_gravity_point_distance_scale>` | ``0.0`` |
  45. +-------------------------------------------------+-----------------------------------------------------------------------------------------+-----------------------+
  46. | :ref:`SpaceOverride<enum_Area3D_SpaceOverride>` | :ref:`gravity_space_override<class_Area3D_property_gravity_space_override>` | ``0`` |
  47. +-------------------------------------------------+-----------------------------------------------------------------------------------------+-----------------------+
  48. | :ref:`float<class_float>` | :ref:`linear_damp<class_Area3D_property_linear_damp>` | ``0.1`` |
  49. +-------------------------------------------------+-----------------------------------------------------------------------------------------+-----------------------+
  50. | :ref:`SpaceOverride<enum_Area3D_SpaceOverride>` | :ref:`linear_damp_space_override<class_Area3D_property_linear_damp_space_override>` | ``0`` |
  51. +-------------------------------------------------+-----------------------------------------------------------------------------------------+-----------------------+
  52. | :ref:`bool<class_bool>` | :ref:`monitorable<class_Area3D_property_monitorable>` | ``true`` |
  53. +-------------------------------------------------+-----------------------------------------------------------------------------------------+-----------------------+
  54. | :ref:`bool<class_bool>` | :ref:`monitoring<class_Area3D_property_monitoring>` | ``true`` |
  55. +-------------------------------------------------+-----------------------------------------------------------------------------------------+-----------------------+
  56. | :ref:`float<class_float>` | :ref:`priority<class_Area3D_property_priority>` | ``0.0`` |
  57. +-------------------------------------------------+-----------------------------------------------------------------------------------------+-----------------------+
  58. | :ref:`float<class_float>` | :ref:`reverb_bus_amount<class_Area3D_property_reverb_bus_amount>` | ``0.0`` |
  59. +-------------------------------------------------+-----------------------------------------------------------------------------------------+-----------------------+
  60. | :ref:`bool<class_bool>` | :ref:`reverb_bus_enabled<class_Area3D_property_reverb_bus_enabled>` | ``false`` |
  61. +-------------------------------------------------+-----------------------------------------------------------------------------------------+-----------------------+
  62. | :ref:`StringName<class_StringName>` | :ref:`reverb_bus_name<class_Area3D_property_reverb_bus_name>` | ``&"Master"`` |
  63. +-------------------------------------------------+-----------------------------------------------------------------------------------------+-----------------------+
  64. | :ref:`float<class_float>` | :ref:`reverb_bus_uniformity<class_Area3D_property_reverb_bus_uniformity>` | ``0.0`` |
  65. +-------------------------------------------------+-----------------------------------------------------------------------------------------+-----------------------+
  66. | :ref:`float<class_float>` | :ref:`wind_attenuation_factor<class_Area3D_property_wind_attenuation_factor>` | ``0.0`` |
  67. +-------------------------------------------------+-----------------------------------------------------------------------------------------+-----------------------+
  68. | :ref:`float<class_float>` | :ref:`wind_force_magnitude<class_Area3D_property_wind_force_magnitude>` | ``0.0`` |
  69. +-------------------------------------------------+-----------------------------------------------------------------------------------------+-----------------------+
  70. | :ref:`NodePath<class_NodePath>` | :ref:`wind_source_path<class_Area3D_property_wind_source_path>` | ``NodePath("")`` |
  71. +-------------------------------------------------+-----------------------------------------------------------------------------------------+-----------------------+
  72. .. rst-class:: classref-reftable-group
  73. Methods
  74. -------
  75. .. table::
  76. :widths: auto
  77. +-------------------------------+----------------------------------------------------------------------------------------------------------+
  78. | :ref:`Area3D[]<class_Area3D>` | :ref:`get_overlapping_areas<class_Area3D_method_get_overlapping_areas>` **(** **)** |const| |
  79. +-------------------------------+----------------------------------------------------------------------------------------------------------+
  80. | :ref:`Node3D[]<class_Node3D>` | :ref:`get_overlapping_bodies<class_Area3D_method_get_overlapping_bodies>` **(** **)** |const| |
  81. +-------------------------------+----------------------------------------------------------------------------------------------------------+
  82. | :ref:`bool<class_bool>` | :ref:`has_overlapping_areas<class_Area3D_method_has_overlapping_areas>` **(** **)** |const| |
  83. +-------------------------------+----------------------------------------------------------------------------------------------------------+
  84. | :ref:`bool<class_bool>` | :ref:`has_overlapping_bodies<class_Area3D_method_has_overlapping_bodies>` **(** **)** |const| |
  85. +-------------------------------+----------------------------------------------------------------------------------------------------------+
  86. | :ref:`bool<class_bool>` | :ref:`overlaps_area<class_Area3D_method_overlaps_area>` **(** :ref:`Node<class_Node>` area **)** |const| |
  87. +-------------------------------+----------------------------------------------------------------------------------------------------------+
  88. | :ref:`bool<class_bool>` | :ref:`overlaps_body<class_Area3D_method_overlaps_body>` **(** :ref:`Node<class_Node>` body **)** |const| |
  89. +-------------------------------+----------------------------------------------------------------------------------------------------------+
  90. .. rst-class:: classref-section-separator
  91. ----
  92. .. rst-class:: classref-descriptions-group
  93. Signals
  94. -------
  95. .. _class_Area3D_signal_area_entered:
  96. .. rst-class:: classref-signal
  97. **area_entered** **(** :ref:`Area3D<class_Area3D>` area **)**
  98. Emitted when the received ``area`` enters this area. Requires :ref:`monitoring<class_Area3D_property_monitoring>` to be set to ``true``.
  99. .. rst-class:: classref-item-separator
  100. ----
  101. .. _class_Area3D_signal_area_exited:
  102. .. rst-class:: classref-signal
  103. **area_exited** **(** :ref:`Area3D<class_Area3D>` area **)**
  104. Emitted when the received ``area`` exits this area. Requires :ref:`monitoring<class_Area3D_property_monitoring>` to be set to ``true``.
  105. .. rst-class:: classref-item-separator
  106. ----
  107. .. _class_Area3D_signal_area_shape_entered:
  108. .. rst-class:: classref-signal
  109. **area_shape_entered** **(** :ref:`RID<class_RID>` area_rid, :ref:`Area3D<class_Area3D>` area, :ref:`int<class_int>` area_shape_index, :ref:`int<class_int>` local_shape_index **)**
  110. Emitted when a :ref:`Shape3D<class_Shape3D>` of the received ``area`` enters a shape of this area. Requires :ref:`monitoring<class_Area3D_property_monitoring>` to be set to ``true``.
  111. \ ``local_shape_index`` and ``area_shape_index`` contain indices of the interacting shapes from this area and the other area, respectively. ``area_rid`` contains the :ref:`RID<class_RID>` of the other area. These values can be used with the :ref:`PhysicsServer3D<class_PhysicsServer3D>`.
  112. \ **Example of getting the** :ref:`CollisionShape3D<class_CollisionShape3D>` **node from the shape index:**\
  113. .. tabs::
  114. .. code-tab:: gdscript
  115. var other_shape_owner = area.shape_find_owner(area_shape_index)
  116. var other_shape_node = area.shape_owner_get_owner(other_shape_owner)
  117. var local_shape_owner = shape_find_owner(local_shape_index)
  118. var local_shape_node = shape_owner_get_owner(local_shape_owner)
  119. .. rst-class:: classref-item-separator
  120. ----
  121. .. _class_Area3D_signal_area_shape_exited:
  122. .. rst-class:: classref-signal
  123. **area_shape_exited** **(** :ref:`RID<class_RID>` area_rid, :ref:`Area3D<class_Area3D>` area, :ref:`int<class_int>` area_shape_index, :ref:`int<class_int>` local_shape_index **)**
  124. Emitted when a :ref:`Shape3D<class_Shape3D>` of the received ``area`` exits a shape of this area. Requires :ref:`monitoring<class_Area3D_property_monitoring>` to be set to ``true``.
  125. See also :ref:`area_shape_entered<class_Area3D_signal_area_shape_entered>`.
  126. .. rst-class:: classref-item-separator
  127. ----
  128. .. _class_Area3D_signal_body_entered:
  129. .. rst-class:: classref-signal
  130. **body_entered** **(** :ref:`Node3D<class_Node3D>` body **)**
  131. Emitted when the received ``body`` enters this area. ``body`` can be a :ref:`PhysicsBody3D<class_PhysicsBody3D>` or a :ref:`GridMap<class_GridMap>`. :ref:`GridMap<class_GridMap>`\ s are detected if their :ref:`MeshLibrary<class_MeshLibrary>` has collision shapes configured. Requires :ref:`monitoring<class_Area3D_property_monitoring>` to be set to ``true``.
  132. .. rst-class:: classref-item-separator
  133. ----
  134. .. _class_Area3D_signal_body_exited:
  135. .. rst-class:: classref-signal
  136. **body_exited** **(** :ref:`Node3D<class_Node3D>` body **)**
  137. Emitted when the received ``body`` exits this area. ``body`` can be a :ref:`PhysicsBody3D<class_PhysicsBody3D>` or a :ref:`GridMap<class_GridMap>`. :ref:`GridMap<class_GridMap>`\ s are detected if their :ref:`MeshLibrary<class_MeshLibrary>` has collision shapes configured. Requires :ref:`monitoring<class_Area3D_property_monitoring>` to be set to ``true``.
  138. .. rst-class:: classref-item-separator
  139. ----
  140. .. _class_Area3D_signal_body_shape_entered:
  141. .. rst-class:: classref-signal
  142. **body_shape_entered** **(** :ref:`RID<class_RID>` body_rid, :ref:`Node3D<class_Node3D>` body, :ref:`int<class_int>` body_shape_index, :ref:`int<class_int>` local_shape_index **)**
  143. Emitted when a :ref:`Shape3D<class_Shape3D>` of the received ``body`` enters a shape of this area. ``body`` can be a :ref:`PhysicsBody3D<class_PhysicsBody3D>` or a :ref:`GridMap<class_GridMap>`. :ref:`GridMap<class_GridMap>`\ s are detected if their :ref:`MeshLibrary<class_MeshLibrary>` has collision shapes configured. Requires :ref:`monitoring<class_Area3D_property_monitoring>` to be set to ``true``.
  144. \ ``local_shape_index`` and ``body_shape_index`` contain indices of the interacting shapes from this area and the interacting body, respectively. ``body_rid`` contains the :ref:`RID<class_RID>` of the body. These values can be used with the :ref:`PhysicsServer3D<class_PhysicsServer3D>`.
  145. \ **Example of getting the** :ref:`CollisionShape3D<class_CollisionShape3D>` **node from the shape index:**\
  146. .. tabs::
  147. .. code-tab:: gdscript
  148. var body_shape_owner = body.shape_find_owner(body_shape_index)
  149. var body_shape_node = body.shape_owner_get_owner(body_shape_owner)
  150. var local_shape_owner = shape_find_owner(local_shape_index)
  151. var local_shape_node = shape_owner_get_owner(local_shape_owner)
  152. .. rst-class:: classref-item-separator
  153. ----
  154. .. _class_Area3D_signal_body_shape_exited:
  155. .. rst-class:: classref-signal
  156. **body_shape_exited** **(** :ref:`RID<class_RID>` body_rid, :ref:`Node3D<class_Node3D>` body, :ref:`int<class_int>` body_shape_index, :ref:`int<class_int>` local_shape_index **)**
  157. Emitted when a :ref:`Shape3D<class_Shape3D>` of the received ``body`` exits a shape of this area. ``body`` can be a :ref:`PhysicsBody3D<class_PhysicsBody3D>` or a :ref:`GridMap<class_GridMap>`. :ref:`GridMap<class_GridMap>`\ s are detected if their :ref:`MeshLibrary<class_MeshLibrary>` has collision shapes configured. Requires :ref:`monitoring<class_Area3D_property_monitoring>` to be set to ``true``.
  158. See also :ref:`body_shape_entered<class_Area3D_signal_body_shape_entered>`.
  159. .. rst-class:: classref-section-separator
  160. ----
  161. .. rst-class:: classref-descriptions-group
  162. Enumerations
  163. ------------
  164. .. _enum_Area3D_SpaceOverride:
  165. .. rst-class:: classref-enumeration
  166. enum **SpaceOverride**:
  167. .. _class_Area3D_constant_SPACE_OVERRIDE_DISABLED:
  168. .. rst-class:: classref-enumeration-constant
  169. :ref:`SpaceOverride<enum_Area3D_SpaceOverride>` **SPACE_OVERRIDE_DISABLED** = ``0``
  170. This area does not affect gravity/damping.
  171. .. _class_Area3D_constant_SPACE_OVERRIDE_COMBINE:
  172. .. rst-class:: classref-enumeration-constant
  173. :ref:`SpaceOverride<enum_Area3D_SpaceOverride>` **SPACE_OVERRIDE_COMBINE** = ``1``
  174. This area adds its gravity/damping values to whatever has been calculated so far (in :ref:`priority<class_Area3D_property_priority>` order).
  175. .. _class_Area3D_constant_SPACE_OVERRIDE_COMBINE_REPLACE:
  176. .. rst-class:: classref-enumeration-constant
  177. :ref:`SpaceOverride<enum_Area3D_SpaceOverride>` **SPACE_OVERRIDE_COMBINE_REPLACE** = ``2``
  178. This area adds its gravity/damping values to whatever has been calculated so far (in :ref:`priority<class_Area3D_property_priority>` order), ignoring any lower priority areas.
  179. .. _class_Area3D_constant_SPACE_OVERRIDE_REPLACE:
  180. .. rst-class:: classref-enumeration-constant
  181. :ref:`SpaceOverride<enum_Area3D_SpaceOverride>` **SPACE_OVERRIDE_REPLACE** = ``3``
  182. This area replaces any gravity/damping, even the defaults, ignoring any lower priority areas.
  183. .. _class_Area3D_constant_SPACE_OVERRIDE_REPLACE_COMBINE:
  184. .. rst-class:: classref-enumeration-constant
  185. :ref:`SpaceOverride<enum_Area3D_SpaceOverride>` **SPACE_OVERRIDE_REPLACE_COMBINE** = ``4``
  186. This area replaces any gravity/damping calculated so far (in :ref:`priority<class_Area3D_property_priority>` order), but keeps calculating the rest of the areas.
  187. .. rst-class:: classref-section-separator
  188. ----
  189. .. rst-class:: classref-descriptions-group
  190. Property Descriptions
  191. ---------------------
  192. .. _class_Area3D_property_angular_damp:
  193. .. rst-class:: classref-property
  194. :ref:`float<class_float>` **angular_damp** = ``0.1``
  195. .. rst-class:: classref-property-setget
  196. - void **set_angular_damp** **(** :ref:`float<class_float>` value **)**
  197. - :ref:`float<class_float>` **get_angular_damp** **(** **)**
  198. The rate at which objects stop spinning in this area. Represents the angular velocity lost per second.
  199. See :ref:`ProjectSettings.physics/3d/default_angular_damp<class_ProjectSettings_property_physics/3d/default_angular_damp>` for more details about damping.
  200. .. rst-class:: classref-item-separator
  201. ----
  202. .. _class_Area3D_property_angular_damp_space_override:
  203. .. rst-class:: classref-property
  204. :ref:`SpaceOverride<enum_Area3D_SpaceOverride>` **angular_damp_space_override** = ``0``
  205. .. rst-class:: classref-property-setget
  206. - void **set_angular_damp_space_override_mode** **(** :ref:`SpaceOverride<enum_Area3D_SpaceOverride>` value **)**
  207. - :ref:`SpaceOverride<enum_Area3D_SpaceOverride>` **get_angular_damp_space_override_mode** **(** **)**
  208. Override mode for angular damping calculations within this area. See :ref:`SpaceOverride<enum_Area3D_SpaceOverride>` for possible values.
  209. .. rst-class:: classref-item-separator
  210. ----
  211. .. _class_Area3D_property_audio_bus_name:
  212. .. rst-class:: classref-property
  213. :ref:`StringName<class_StringName>` **audio_bus_name** = ``&"Master"``
  214. .. rst-class:: classref-property-setget
  215. - void **set_audio_bus_name** **(** :ref:`StringName<class_StringName>` value **)**
  216. - :ref:`StringName<class_StringName>` **get_audio_bus_name** **(** **)**
  217. The name of the area's audio bus.
  218. .. rst-class:: classref-item-separator
  219. ----
  220. .. _class_Area3D_property_audio_bus_override:
  221. .. rst-class:: classref-property
  222. :ref:`bool<class_bool>` **audio_bus_override** = ``false``
  223. .. rst-class:: classref-property-setget
  224. - void **set_audio_bus_override** **(** :ref:`bool<class_bool>` value **)**
  225. - :ref:`bool<class_bool>` **is_overriding_audio_bus** **(** **)**
  226. If ``true``, the area's audio bus overrides the default audio bus.
  227. .. rst-class:: classref-item-separator
  228. ----
  229. .. _class_Area3D_property_gravity:
  230. .. rst-class:: classref-property
  231. :ref:`float<class_float>` **gravity** = ``9.8``
  232. .. rst-class:: classref-property-setget
  233. - void **set_gravity** **(** :ref:`float<class_float>` value **)**
  234. - :ref:`float<class_float>` **get_gravity** **(** **)**
  235. The area's gravity intensity (in meters per second squared). This value multiplies the gravity direction. This is useful to alter the force of gravity without altering its direction.
  236. .. rst-class:: classref-item-separator
  237. ----
  238. .. _class_Area3D_property_gravity_direction:
  239. .. rst-class:: classref-property
  240. :ref:`Vector3<class_Vector3>` **gravity_direction** = ``Vector3(0, -1, 0)``
  241. .. rst-class:: classref-property-setget
  242. - void **set_gravity_direction** **(** :ref:`Vector3<class_Vector3>` value **)**
  243. - :ref:`Vector3<class_Vector3>` **get_gravity_direction** **(** **)**
  244. The area's gravity vector (not normalized).
  245. .. rst-class:: classref-item-separator
  246. ----
  247. .. _class_Area3D_property_gravity_point:
  248. .. rst-class:: classref-property
  249. :ref:`bool<class_bool>` **gravity_point** = ``false``
  250. .. rst-class:: classref-property-setget
  251. - void **set_gravity_is_point** **(** :ref:`bool<class_bool>` value **)**
  252. - :ref:`bool<class_bool>` **is_gravity_a_point** **(** **)**
  253. If ``true``, gravity is calculated from a point (set via :ref:`gravity_point_center<class_Area3D_property_gravity_point_center>`). See also :ref:`gravity_space_override<class_Area3D_property_gravity_space_override>`.
  254. .. rst-class:: classref-item-separator
  255. ----
  256. .. _class_Area3D_property_gravity_point_center:
  257. .. rst-class:: classref-property
  258. :ref:`Vector3<class_Vector3>` **gravity_point_center** = ``Vector3(0, -1, 0)``
  259. .. rst-class:: classref-property-setget
  260. - void **set_gravity_point_center** **(** :ref:`Vector3<class_Vector3>` value **)**
  261. - :ref:`Vector3<class_Vector3>` **get_gravity_point_center** **(** **)**
  262. If gravity is a point (see :ref:`gravity_point<class_Area3D_property_gravity_point>`), this will be the point of attraction.
  263. .. rst-class:: classref-item-separator
  264. ----
  265. .. _class_Area3D_property_gravity_point_distance_scale:
  266. .. rst-class:: classref-property
  267. :ref:`float<class_float>` **gravity_point_distance_scale** = ``0.0``
  268. .. rst-class:: classref-property-setget
  269. - void **set_gravity_point_distance_scale** **(** :ref:`float<class_float>` value **)**
  270. - :ref:`float<class_float>` **get_gravity_point_distance_scale** **(** **)**
  271. The falloff factor for point gravity. The greater the value, the faster gravity decreases with distance.
  272. .. rst-class:: classref-item-separator
  273. ----
  274. .. _class_Area3D_property_gravity_space_override:
  275. .. rst-class:: classref-property
  276. :ref:`SpaceOverride<enum_Area3D_SpaceOverride>` **gravity_space_override** = ``0``
  277. .. rst-class:: classref-property-setget
  278. - void **set_gravity_space_override_mode** **(** :ref:`SpaceOverride<enum_Area3D_SpaceOverride>` value **)**
  279. - :ref:`SpaceOverride<enum_Area3D_SpaceOverride>` **get_gravity_space_override_mode** **(** **)**
  280. Override mode for gravity calculations within this area. See :ref:`SpaceOverride<enum_Area3D_SpaceOverride>` for possible values.
  281. .. rst-class:: classref-item-separator
  282. ----
  283. .. _class_Area3D_property_linear_damp:
  284. .. rst-class:: classref-property
  285. :ref:`float<class_float>` **linear_damp** = ``0.1``
  286. .. rst-class:: classref-property-setget
  287. - void **set_linear_damp** **(** :ref:`float<class_float>` value **)**
  288. - :ref:`float<class_float>` **get_linear_damp** **(** **)**
  289. The rate at which objects stop moving in this area. Represents the linear velocity lost per second.
  290. See :ref:`ProjectSettings.physics/3d/default_linear_damp<class_ProjectSettings_property_physics/3d/default_linear_damp>` for more details about damping.
  291. .. rst-class:: classref-item-separator
  292. ----
  293. .. _class_Area3D_property_linear_damp_space_override:
  294. .. rst-class:: classref-property
  295. :ref:`SpaceOverride<enum_Area3D_SpaceOverride>` **linear_damp_space_override** = ``0``
  296. .. rst-class:: classref-property-setget
  297. - void **set_linear_damp_space_override_mode** **(** :ref:`SpaceOverride<enum_Area3D_SpaceOverride>` value **)**
  298. - :ref:`SpaceOverride<enum_Area3D_SpaceOverride>` **get_linear_damp_space_override_mode** **(** **)**
  299. Override mode for linear damping calculations within this area. See :ref:`SpaceOverride<enum_Area3D_SpaceOverride>` for possible values.
  300. .. rst-class:: classref-item-separator
  301. ----
  302. .. _class_Area3D_property_monitorable:
  303. .. rst-class:: classref-property
  304. :ref:`bool<class_bool>` **monitorable** = ``true``
  305. .. rst-class:: classref-property-setget
  306. - void **set_monitorable** **(** :ref:`bool<class_bool>` value **)**
  307. - :ref:`bool<class_bool>` **is_monitorable** **(** **)**
  308. If ``true``, other monitoring areas can detect this area.
  309. .. rst-class:: classref-item-separator
  310. ----
  311. .. _class_Area3D_property_monitoring:
  312. .. rst-class:: classref-property
  313. :ref:`bool<class_bool>` **monitoring** = ``true``
  314. .. rst-class:: classref-property-setget
  315. - void **set_monitoring** **(** :ref:`bool<class_bool>` value **)**
  316. - :ref:`bool<class_bool>` **is_monitoring** **(** **)**
  317. If ``true``, the area detects bodies or areas entering and exiting it.
  318. .. rst-class:: classref-item-separator
  319. ----
  320. .. _class_Area3D_property_priority:
  321. .. rst-class:: classref-property
  322. :ref:`float<class_float>` **priority** = ``0.0``
  323. .. rst-class:: classref-property-setget
  324. - void **set_priority** **(** :ref:`float<class_float>` value **)**
  325. - :ref:`float<class_float>` **get_priority** **(** **)**
  326. The area's priority. Higher priority areas are processed first.
  327. .. rst-class:: classref-item-separator
  328. ----
  329. .. _class_Area3D_property_reverb_bus_amount:
  330. .. rst-class:: classref-property
  331. :ref:`float<class_float>` **reverb_bus_amount** = ``0.0``
  332. .. rst-class:: classref-property-setget
  333. - void **set_reverb_amount** **(** :ref:`float<class_float>` value **)**
  334. - :ref:`float<class_float>` **get_reverb_amount** **(** **)**
  335. The degree to which this area applies reverb to its associated audio. Ranges from ``0`` to ``1`` with ``0.1`` precision.
  336. .. rst-class:: classref-item-separator
  337. ----
  338. .. _class_Area3D_property_reverb_bus_enabled:
  339. .. rst-class:: classref-property
  340. :ref:`bool<class_bool>` **reverb_bus_enabled** = ``false``
  341. .. rst-class:: classref-property-setget
  342. - void **set_use_reverb_bus** **(** :ref:`bool<class_bool>` value **)**
  343. - :ref:`bool<class_bool>` **is_using_reverb_bus** **(** **)**
  344. If ``true``, the area applies reverb to its associated audio.
  345. .. rst-class:: classref-item-separator
  346. ----
  347. .. _class_Area3D_property_reverb_bus_name:
  348. .. rst-class:: classref-property
  349. :ref:`StringName<class_StringName>` **reverb_bus_name** = ``&"Master"``
  350. .. rst-class:: classref-property-setget
  351. - void **set_reverb_bus_name** **(** :ref:`StringName<class_StringName>` value **)**
  352. - :ref:`StringName<class_StringName>` **get_reverb_bus_name** **(** **)**
  353. The name of the reverb bus to use for this area's associated audio.
  354. .. rst-class:: classref-item-separator
  355. ----
  356. .. _class_Area3D_property_reverb_bus_uniformity:
  357. .. rst-class:: classref-property
  358. :ref:`float<class_float>` **reverb_bus_uniformity** = ``0.0``
  359. .. rst-class:: classref-property-setget
  360. - void **set_reverb_uniformity** **(** :ref:`float<class_float>` value **)**
  361. - :ref:`float<class_float>` **get_reverb_uniformity** **(** **)**
  362. The degree to which this area's reverb is a uniform effect. Ranges from ``0`` to ``1`` with ``0.1`` precision.
  363. .. rst-class:: classref-item-separator
  364. ----
  365. .. _class_Area3D_property_wind_attenuation_factor:
  366. .. rst-class:: classref-property
  367. :ref:`float<class_float>` **wind_attenuation_factor** = ``0.0``
  368. .. rst-class:: classref-property-setget
  369. - void **set_wind_attenuation_factor** **(** :ref:`float<class_float>` value **)**
  370. - :ref:`float<class_float>` **get_wind_attenuation_factor** **(** **)**
  371. The exponential rate at which wind force decreases with distance from its origin.
  372. .. rst-class:: classref-item-separator
  373. ----
  374. .. _class_Area3D_property_wind_force_magnitude:
  375. .. rst-class:: classref-property
  376. :ref:`float<class_float>` **wind_force_magnitude** = ``0.0``
  377. .. rst-class:: classref-property-setget
  378. - void **set_wind_force_magnitude** **(** :ref:`float<class_float>` value **)**
  379. - :ref:`float<class_float>` **get_wind_force_magnitude** **(** **)**
  380. The magnitude of area-specific wind force.
  381. .. rst-class:: classref-item-separator
  382. ----
  383. .. _class_Area3D_property_wind_source_path:
  384. .. rst-class:: classref-property
  385. :ref:`NodePath<class_NodePath>` **wind_source_path** = ``NodePath("")``
  386. .. rst-class:: classref-property-setget
  387. - void **set_wind_source_path** **(** :ref:`NodePath<class_NodePath>` value **)**
  388. - :ref:`NodePath<class_NodePath>` **get_wind_source_path** **(** **)**
  389. The :ref:`Node3D<class_Node3D>` which is used to specify the the direction and origin of an area-specific wind force. The direction is opposite to the z-axis of the :ref:`Node3D<class_Node3D>`'s local transform, and its origin is the origin of the :ref:`Node3D<class_Node3D>`'s local transform.
  390. .. rst-class:: classref-section-separator
  391. ----
  392. .. rst-class:: classref-descriptions-group
  393. Method Descriptions
  394. -------------------
  395. .. _class_Area3D_method_get_overlapping_areas:
  396. .. rst-class:: classref-method
  397. :ref:`Area3D[]<class_Area3D>` **get_overlapping_areas** **(** **)** |const|
  398. Returns a list of intersecting **Area3D**\ s. The overlapping area's :ref:`CollisionObject3D.collision_layer<class_CollisionObject3D_property_collision_layer>` must be part of this area's :ref:`CollisionObject3D.collision_mask<class_CollisionObject3D_property_collision_mask>` in order to be detected.
  399. For performance reasons (collisions are all processed at the same time) this list is modified once during the physics step, not immediately after objects are moved. Consider using signals instead.
  400. .. rst-class:: classref-item-separator
  401. ----
  402. .. _class_Area3D_method_get_overlapping_bodies:
  403. .. rst-class:: classref-method
  404. :ref:`Node3D[]<class_Node3D>` **get_overlapping_bodies** **(** **)** |const|
  405. Returns a list of intersecting :ref:`PhysicsBody3D<class_PhysicsBody3D>`\ s and :ref:`GridMap<class_GridMap>`\ s. The overlapping body's :ref:`CollisionObject3D.collision_layer<class_CollisionObject3D_property_collision_layer>` must be part of this area's :ref:`CollisionObject3D.collision_mask<class_CollisionObject3D_property_collision_mask>` in order to be detected.
  406. For performance reasons (collisions are all processed at the same time) this list is modified once during the physics step, not immediately after objects are moved. Consider using signals instead.
  407. .. rst-class:: classref-item-separator
  408. ----
  409. .. _class_Area3D_method_has_overlapping_areas:
  410. .. rst-class:: classref-method
  411. :ref:`bool<class_bool>` **has_overlapping_areas** **(** **)** |const|
  412. Returns ``true`` if intersecting any **Area3D**\ s, otherwise returns ``false``. The overlapping area's :ref:`CollisionObject3D.collision_layer<class_CollisionObject3D_property_collision_layer>` must be part of this area's :ref:`CollisionObject3D.collision_mask<class_CollisionObject3D_property_collision_mask>` in order to be detected.
  413. For performance reasons (collisions are all processed at the same time) the list of overlapping areas is modified once during the physics step, not immediately after objects are moved. Consider using signals instead.
  414. .. rst-class:: classref-item-separator
  415. ----
  416. .. _class_Area3D_method_has_overlapping_bodies:
  417. .. rst-class:: classref-method
  418. :ref:`bool<class_bool>` **has_overlapping_bodies** **(** **)** |const|
  419. Returns ``true`` if intersecting any :ref:`PhysicsBody3D<class_PhysicsBody3D>`\ s or :ref:`GridMap<class_GridMap>`\ s, otherwise returns ``false``. The overlapping body's :ref:`CollisionObject3D.collision_layer<class_CollisionObject3D_property_collision_layer>` must be part of this area's :ref:`CollisionObject3D.collision_mask<class_CollisionObject3D_property_collision_mask>` in order to be detected.
  420. For performance reasons (collisions are all processed at the same time) the list of overlapping bodies is modified once during the physics step, not immediately after objects are moved. Consider using signals instead.
  421. .. rst-class:: classref-item-separator
  422. ----
  423. .. _class_Area3D_method_overlaps_area:
  424. .. rst-class:: classref-method
  425. :ref:`bool<class_bool>` **overlaps_area** **(** :ref:`Node<class_Node>` area **)** |const|
  426. Returns ``true`` if the given **Area3D** intersects or overlaps this **Area3D**, ``false`` otherwise.
  427. \ **Note:** The result of this test is not immediate after moving objects. For performance, list of overlaps is updated once per frame and before the physics step. Consider using signals instead.
  428. .. rst-class:: classref-item-separator
  429. ----
  430. .. _class_Area3D_method_overlaps_body:
  431. .. rst-class:: classref-method
  432. :ref:`bool<class_bool>` **overlaps_body** **(** :ref:`Node<class_Node>` body **)** |const|
  433. Returns ``true`` if the given physics body intersects or overlaps this **Area3D**, ``false`` otherwise.
  434. \ **Note:** The result of this test is not immediate after moving objects. For performance, list of overlaps is updated once per frame and before the physics step. Consider using signals instead.
  435. The ``body`` argument can either be a :ref:`PhysicsBody3D<class_PhysicsBody3D>` or a :ref:`GridMap<class_GridMap>` instance. While GridMaps are not physics body themselves, they register their tiles with collision shapes as a virtual physics body.
  436. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
  437. .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
  438. .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
  439. .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
  440. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
  441. .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`