class_area.rst 31 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443
  1. .. Generated automatically by doc/tools/makerst.py in Godot's source tree.
  2. .. DO NOT EDIT THIS FILE, but the Area.xml source instead.
  3. .. The source is found in doc/classes or modules/<name>/doc_classes.
  4. .. _class_Area:
  5. Area
  6. ====
  7. **Inherits:** :ref:`CollisionObject<class_collisionobject>` **<** :ref:`Spatial<class_spatial>` **<** :ref:`Node<class_node>` **<** :ref:`Object<class_object>`
  8. **Category:** Core
  9. Brief Description
  10. -----------------
  11. General purpose area node for detection and 3D physics influence.
  12. Member Functions
  13. ----------------
  14. +--------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+
  15. | :ref:`float<class_float>` | :ref:`get_angular_damp<class_Area_get_angular_damp>` **(** **)** const |
  16. +--------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+
  17. | :ref:`String<class_string>` | :ref:`get_audio_bus<class_Area_get_audio_bus>` **(** **)** const |
  18. +--------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+
  19. | :ref:`int<class_int>` | :ref:`get_collision_layer<class_Area_get_collision_layer>` **(** **)** const |
  20. +--------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+
  21. | :ref:`bool<class_bool>` | :ref:`get_collision_layer_bit<class_Area_get_collision_layer_bit>` **(** :ref:`int<class_int>` bit **)** const |
  22. +--------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+
  23. | :ref:`int<class_int>` | :ref:`get_collision_mask<class_Area_get_collision_mask>` **(** **)** const |
  24. +--------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+
  25. | :ref:`bool<class_bool>` | :ref:`get_collision_mask_bit<class_Area_get_collision_mask_bit>` **(** :ref:`int<class_int>` bit **)** const |
  26. +--------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+
  27. | :ref:`float<class_float>` | :ref:`get_gravity<class_Area_get_gravity>` **(** **)** const |
  28. +--------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+
  29. | :ref:`float<class_float>` | :ref:`get_gravity_distance_scale<class_Area_get_gravity_distance_scale>` **(** **)** const |
  30. +--------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+
  31. | :ref:`Vector3<class_vector3>` | :ref:`get_gravity_vector<class_Area_get_gravity_vector>` **(** **)** const |
  32. +--------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+
  33. | :ref:`float<class_float>` | :ref:`get_linear_damp<class_Area_get_linear_damp>` **(** **)** const |
  34. +--------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+
  35. | :ref:`Array<class_array>` | :ref:`get_overlapping_areas<class_Area_get_overlapping_areas>` **(** **)** const |
  36. +--------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+
  37. | :ref:`Array<class_array>` | :ref:`get_overlapping_bodies<class_Area_get_overlapping_bodies>` **(** **)** const |
  38. +--------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+
  39. | :ref:`float<class_float>` | :ref:`get_priority<class_Area_get_priority>` **(** **)** const |
  40. +--------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+
  41. | :ref:`float<class_float>` | :ref:`get_reverb_amount<class_Area_get_reverb_amount>` **(** **)** const |
  42. +--------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+
  43. | :ref:`String<class_string>` | :ref:`get_reverb_bus<class_Area_get_reverb_bus>` **(** **)** const |
  44. +--------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+
  45. | :ref:`float<class_float>` | :ref:`get_reverb_uniformity<class_Area_get_reverb_uniformity>` **(** **)** const |
  46. +--------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+
  47. | :ref:`int<class_int>` | :ref:`get_space_override_mode<class_Area_get_space_override_mode>` **(** **)** const |
  48. +--------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+
  49. | :ref:`bool<class_bool>` | :ref:`is_gravity_a_point<class_Area_is_gravity_a_point>` **(** **)** const |
  50. +--------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+
  51. | :ref:`bool<class_bool>` | :ref:`is_monitorable<class_Area_is_monitorable>` **(** **)** const |
  52. +--------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+
  53. | :ref:`bool<class_bool>` | :ref:`is_monitoring<class_Area_is_monitoring>` **(** **)** const |
  54. +--------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+
  55. | :ref:`bool<class_bool>` | :ref:`is_overriding_audio_bus<class_Area_is_overriding_audio_bus>` **(** **)** const |
  56. +--------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+
  57. | :ref:`bool<class_bool>` | :ref:`is_using_reverb_bus<class_Area_is_using_reverb_bus>` **(** **)** const |
  58. +--------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+
  59. | :ref:`bool<class_bool>` | :ref:`overlaps_area<class_Area_overlaps_area>` **(** :ref:`Node<class_node>` area **)** const |
  60. +--------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+
  61. | :ref:`bool<class_bool>` | :ref:`overlaps_body<class_Area_overlaps_body>` **(** :ref:`Node<class_node>` body **)** const |
  62. +--------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+
  63. | void | :ref:`set_angular_damp<class_Area_set_angular_damp>` **(** :ref:`float<class_float>` angular_damp **)** |
  64. +--------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+
  65. | void | :ref:`set_audio_bus<class_Area_set_audio_bus>` **(** :ref:`String<class_string>` name **)** |
  66. +--------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+
  67. | void | :ref:`set_audio_bus_override<class_Area_set_audio_bus_override>` **(** :ref:`bool<class_bool>` enable **)** |
  68. +--------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+
  69. | void | :ref:`set_collision_layer<class_Area_set_collision_layer>` **(** :ref:`int<class_int>` collision_layer **)** |
  70. +--------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+
  71. | void | :ref:`set_collision_layer_bit<class_Area_set_collision_layer_bit>` **(** :ref:`int<class_int>` bit, :ref:`bool<class_bool>` value **)** |
  72. +--------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+
  73. | void | :ref:`set_collision_mask<class_Area_set_collision_mask>` **(** :ref:`int<class_int>` collision_mask **)** |
  74. +--------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+
  75. | void | :ref:`set_collision_mask_bit<class_Area_set_collision_mask_bit>` **(** :ref:`int<class_int>` bit, :ref:`bool<class_bool>` value **)** |
  76. +--------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+
  77. | void | :ref:`set_gravity<class_Area_set_gravity>` **(** :ref:`float<class_float>` gravity **)** |
  78. +--------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+
  79. | void | :ref:`set_gravity_distance_scale<class_Area_set_gravity_distance_scale>` **(** :ref:`float<class_float>` distance_scale **)** |
  80. +--------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+
  81. | void | :ref:`set_gravity_is_point<class_Area_set_gravity_is_point>` **(** :ref:`bool<class_bool>` enable **)** |
  82. +--------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+
  83. | void | :ref:`set_gravity_vector<class_Area_set_gravity_vector>` **(** :ref:`Vector3<class_vector3>` vector **)** |
  84. +--------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+
  85. | void | :ref:`set_linear_damp<class_Area_set_linear_damp>` **(** :ref:`float<class_float>` linear_damp **)** |
  86. +--------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+
  87. | void | :ref:`set_monitorable<class_Area_set_monitorable>` **(** :ref:`bool<class_bool>` enable **)** |
  88. +--------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+
  89. | void | :ref:`set_monitoring<class_Area_set_monitoring>` **(** :ref:`bool<class_bool>` enable **)** |
  90. +--------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+
  91. | void | :ref:`set_priority<class_Area_set_priority>` **(** :ref:`float<class_float>` priority **)** |
  92. +--------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+
  93. | void | :ref:`set_reverb_amount<class_Area_set_reverb_amount>` **(** :ref:`float<class_float>` amount **)** |
  94. +--------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+
  95. | void | :ref:`set_reverb_bus<class_Area_set_reverb_bus>` **(** :ref:`String<class_string>` name **)** |
  96. +--------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+
  97. | void | :ref:`set_reverb_uniformity<class_Area_set_reverb_uniformity>` **(** :ref:`float<class_float>` amount **)** |
  98. +--------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+
  99. | void | :ref:`set_space_override_mode<class_Area_set_space_override_mode>` **(** :ref:`int<class_int>` enable **)** |
  100. +--------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+
  101. | void | :ref:`set_use_reverb_bus<class_Area_set_use_reverb_bus>` **(** :ref:`bool<class_bool>` enable **)** |
  102. +--------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+
  103. Signals
  104. -------
  105. - **area_entered** **(** :ref:`Object<class_object>` area **)**
  106. Emitted when another area enters.
  107. - **area_exited** **(** :ref:`Object<class_object>` area **)**
  108. Emitted when another area exits.
  109. - **area_shape_entered** **(** :ref:`int<class_int>` area_id, :ref:`Object<class_object>` area, :ref:`int<class_int>` area_shape, :ref:`int<class_int>` self_shape **)**
  110. Emitted when another area enters, reporting which areas overlapped.
  111. - **area_shape_exited** **(** :ref:`int<class_int>` area_id, :ref:`Object<class_object>` area, :ref:`int<class_int>` area_shape, :ref:`int<class_int>` self_shape **)**
  112. Emitted when another area exits, reporting which areas were overlapping.
  113. - **body_entered** **(** :ref:`Object<class_object>` body **)**
  114. Emitted when a :ref:`PhysicsBody<class_physicsbody>` object enters.
  115. - **body_exited** **(** :ref:`Object<class_object>` body **)**
  116. Emitted when a :ref:`PhysicsBody2D<class_physicsbody2d>` object exits.
  117. - **body_shape_entered** **(** :ref:`int<class_int>` body_id, :ref:`Object<class_object>` body, :ref:`int<class_int>` body_shape, :ref:`int<class_int>` area_shape **)**
  118. Emitted when a :ref:`PhysicsBody2D<class_physicsbody2d>` object enters, reporting which shapes overlapped.
  119. - **body_shape_exited** **(** :ref:`int<class_int>` body_id, :ref:`Object<class_object>` body, :ref:`int<class_int>` body_shape, :ref:`int<class_int>` area_shape **)**
  120. Emitted when a :ref:`PhysicsBody2D<class_physicsbody2d>` object exits, reporting which shapes were overlapping.
  121. Member Variables
  122. ----------------
  123. - :ref:`float<class_float>` **angular_damp** - The rate at which objects stop spinning in this area. Represents the angular velocity lost per second. Values range from [code]0[/code] (no damping) to [code]1[/code] (full damping).
  124. - :ref:`String<class_string>` **audio_bus_name** - The name of the area's audio bus.
  125. - :ref:`bool<class_bool>` **audio_bus_override** - If [code]true[/code] the area's audio bus overrides the default audio bus. Default value: [code]false[/code].
  126. - :ref:`int<class_int>` **collision_layer** - The area's physics layer(s). Collidable objects can exist in any of 32 different layers. A contact is detected if object A is in any of the layers that object B scans, or object B is in any layers that object A scans. See also [code]collision_mask[/code].
  127. - :ref:`int<class_int>` **collision_mask** - The physics layers this area scans to determine collision detection.
  128. - :ref:`float<class_float>` **gravity** - The area's gravity intensity (ranges from -1024 to 1024). This value multiplies the gravity vector. This is useful to alter the force of gravity without altering its direction.
  129. - :ref:`float<class_float>` **gravity_distance_scale** - The falloff factor for point gravity. The greater the value, the faster gravity decreases with distance.
  130. - :ref:`bool<class_bool>` **gravity_point** - If [code]true[/code] gravity is calculated from a point (set via [code]gravity_vec[/code]). Also see [code]space_override[/code]. Default value: [code]false[/code].
  131. - :ref:`Vector3<class_vector3>` **gravity_vec** - The area's gravity vector (not normalized). If gravity is a point (see [method is_gravity_a_point]), this will be the point of attraction.
  132. - :ref:`float<class_float>` **linear_damp** - The rate at which objects stop moving in this area. Represents the linear velocity lost per second. Values range from [code]0[/code] (no damping) to [code]1[/code] (full damping).
  133. - :ref:`bool<class_bool>` **monitorable** - If [code]true[/code] other monitoring areas can detect this area. Default value: [code]true[/code].
  134. - :ref:`bool<class_bool>` **monitoring** - If [code]true[/code] the area detects bodies or areas entering and exiting it. Default value: [code]true[/code].
  135. - :ref:`float<class_float>` **priority** - The area's priority. Higher priority areas are processed first. Default value: 0.
  136. - :ref:`float<class_float>` **reverb_bus_amount**
  137. - :ref:`bool<class_bool>` **reverb_bus_enable**
  138. - :ref:`String<class_string>` **reverb_bus_name**
  139. - :ref:`float<class_float>` **reverb_bus_uniformity**
  140. - :ref:`int<class_int>` **space_override** - Override mode for gravity and damping calculations within this area. See the SPACE_OVERRIDE_* constants for values.
  141. Numeric Constants
  142. -----------------
  143. - **SPACE_OVERRIDE_DISABLED** = **0** --- This area does not affect gravity/damping.
  144. - **SPACE_OVERRIDE_COMBINE** = **1** --- This area adds its gravity/damping values to whatever has been calculated so far (in ``priority`` order).
  145. - **SPACE_OVERRIDE_COMBINE_REPLACE** = **2** --- This area adds its gravity/damping values to whatever has been calculated so far (in ``priority`` order), ignoring any lower priority areas.
  146. - **SPACE_OVERRIDE_REPLACE** = **3** --- This area replaces any gravity/damping, even the defaults, ignoring any lower priority areas.
  147. - **SPACE_OVERRIDE_REPLACE_COMBINE** = **4** --- This area replaces any gravity/damping calculated so far (in ``priority`` order), but keeps calculating the rest of the areas.
  148. Description
  149. -----------
  150. 3D area that detects :ref:`CollisionObject<class_collisionobject>` nodes overlapping, entering, or exiting. Can also alter or override local physics parameters (gravity, damping).
  151. Member Function Description
  152. ---------------------------
  153. .. _class_Area_get_angular_damp:
  154. - :ref:`float<class_float>` **get_angular_damp** **(** **)** const
  155. Return the angular damp rate.
  156. .. _class_Area_get_audio_bus:
  157. - :ref:`String<class_string>` **get_audio_bus** **(** **)** const
  158. .. _class_Area_get_collision_layer:
  159. - :ref:`int<class_int>` **get_collision_layer** **(** **)** const
  160. Return the physics layer this area is in.
  161. .. _class_Area_get_collision_layer_bit:
  162. - :ref:`bool<class_bool>` **get_collision_layer_bit** **(** :ref:`int<class_int>` bit **)** const
  163. Return an individual bit on the layer mask.
  164. .. _class_Area_get_collision_mask:
  165. - :ref:`int<class_int>` **get_collision_mask** **(** **)** const
  166. Return the physics layers this area can scan for collisions.
  167. .. _class_Area_get_collision_mask_bit:
  168. - :ref:`bool<class_bool>` **get_collision_mask_bit** **(** :ref:`int<class_int>` bit **)** const
  169. Return an individual bit on the collision mask.
  170. .. _class_Area_get_gravity:
  171. - :ref:`float<class_float>` **get_gravity** **(** **)** const
  172. Return the gravity intensity.
  173. .. _class_Area_get_gravity_distance_scale:
  174. - :ref:`float<class_float>` **get_gravity_distance_scale** **(** **)** const
  175. Return the falloff factor for point gravity.
  176. .. _class_Area_get_gravity_vector:
  177. - :ref:`Vector3<class_vector3>` **get_gravity_vector** **(** **)** const
  178. Return the gravity vector. If gravity is a point (see :ref:`is_gravity_a_point<class_Area_is_gravity_a_point>`), this will be the attraction center.
  179. .. _class_Area_get_linear_damp:
  180. - :ref:`float<class_float>` **get_linear_damp** **(** **)** const
  181. Return the linear damp rate.
  182. .. _class_Area_get_overlapping_areas:
  183. - :ref:`Array<class_array>` **get_overlapping_areas** **(** **)** const
  184. Returns a list of intersecting :ref:`Area<class_area>`\ s.
  185. .. _class_Area_get_overlapping_bodies:
  186. - :ref:`Array<class_array>` **get_overlapping_bodies** **(** **)** const
  187. Returns a list of intersecting :ref:`PhysicsBody<class_physicsbody>`\ s.
  188. .. _class_Area_get_priority:
  189. - :ref:`float<class_float>` **get_priority** **(** **)** const
  190. Return the processing order of this area.
  191. .. _class_Area_get_reverb_amount:
  192. - :ref:`float<class_float>` **get_reverb_amount** **(** **)** const
  193. .. _class_Area_get_reverb_bus:
  194. - :ref:`String<class_string>` **get_reverb_bus** **(** **)** const
  195. .. _class_Area_get_reverb_uniformity:
  196. - :ref:`float<class_float>` **get_reverb_uniformity** **(** **)** const
  197. .. _class_Area_get_space_override_mode:
  198. - :ref:`int<class_int>` **get_space_override_mode** **(** **)** const
  199. Return the space override mode.
  200. .. _class_Area_is_gravity_a_point:
  201. - :ref:`bool<class_bool>` **is_gravity_a_point** **(** **)** const
  202. Return whether gravity is a point. A point gravity will attract objects towards it, as opposed to a gravity vector, which moves them in a given direction.
  203. .. _class_Area_is_monitorable:
  204. - :ref:`bool<class_bool>` **is_monitorable** **(** **)** const
  205. Return whether this area can be detected by other, monitoring, areas.
  206. .. _class_Area_is_monitoring:
  207. - :ref:`bool<class_bool>` **is_monitoring** **(** **)** const
  208. Return whether this area detects bodies/areas entering/exiting it.
  209. .. _class_Area_is_overriding_audio_bus:
  210. - :ref:`bool<class_bool>` **is_overriding_audio_bus** **(** **)** const
  211. .. _class_Area_is_using_reverb_bus:
  212. - :ref:`bool<class_bool>` **is_using_reverb_bus** **(** **)** const
  213. .. _class_Area_overlaps_area:
  214. - :ref:`bool<class_bool>` **overlaps_area** **(** :ref:`Node<class_node>` area **)** const
  215. If ``true`` the given area overlaps the Area.
  216. .. _class_Area_overlaps_body:
  217. - :ref:`bool<class_bool>` **overlaps_body** **(** :ref:`Node<class_node>` body **)** const
  218. If ``true`` the given body overlaps the Area.
  219. .. _class_Area_set_angular_damp:
  220. - void **set_angular_damp** **(** :ref:`float<class_float>` angular_damp **)**
  221. Set the rate at which objects stop spinning in this area, if there are not any other forces making it spin. The value is a fraction of its current speed, lost per second. Thus, a value of 1.0 should mean stopping immediately, and 0.0 means the object never stops.
  222. In practice, as the fraction of speed lost gets smaller with each frame, a value of 1.0 does not mean the object will stop in exactly one second. Only when the physics calculations are done at 1 frame per second, it does stop in a second.
  223. .. _class_Area_set_audio_bus:
  224. - void **set_audio_bus** **(** :ref:`String<class_string>` name **)**
  225. .. _class_Area_set_audio_bus_override:
  226. - void **set_audio_bus_override** **(** :ref:`bool<class_bool>` enable **)**
  227. .. _class_Area_set_collision_layer:
  228. - void **set_collision_layer** **(** :ref:`int<class_int>` collision_layer **)**
  229. Set the physics layers this area is in.
  230. Collidable objects can exist in any of 32 different layers. These layers are not visual, but more of a tagging system instead. A collidable can use these layers/tags to select with which objects it can collide, using :ref:`set_collision_mask<class_Area_set_collision_mask>`.
  231. A contact is detected if object A is in any of the layers that object B scans, or object B is in any layer scanned by object A.
  232. .. _class_Area_set_collision_layer_bit:
  233. - void **set_collision_layer_bit** **(** :ref:`int<class_int>` bit, :ref:`bool<class_bool>` value **)**
  234. Set/clear individual bits on the layer mask. This makes getting an area in/out of only one layer easier.
  235. .. _class_Area_set_collision_mask:
  236. - void **set_collision_mask** **(** :ref:`int<class_int>` collision_mask **)**
  237. Set the physics layers this area can scan for collisions.
  238. .. _class_Area_set_collision_mask_bit:
  239. - void **set_collision_mask_bit** **(** :ref:`int<class_int>` bit, :ref:`bool<class_bool>` value **)**
  240. Set/clear individual bits on the collision mask. This makes selecting the areas scanned easier.
  241. .. _class_Area_set_gravity:
  242. - void **set_gravity** **(** :ref:`float<class_float>` gravity **)**
  243. Set the gravity intensity. This is useful to alter the force of gravity without altering its direction.
  244. This value multiplies the gravity vector, whether it is the given vector (:ref:`set_gravity_vector<class_Area_set_gravity_vector>`), or a calculated one (when using a center of gravity).
  245. .. _class_Area_set_gravity_distance_scale:
  246. - void **set_gravity_distance_scale** **(** :ref:`float<class_float>` distance_scale **)**
  247. Set the falloff factor for point gravity. The greater this value is, the faster the strength of gravity decreases with the square of distance.
  248. .. _class_Area_set_gravity_is_point:
  249. - void **set_gravity_is_point** **(** :ref:`bool<class_bool>` enable **)**
  250. When overriding space parameters, this method sets whether this area has a center of gravity. To set/get the location of the center of gravity, use :ref:`set_gravity_vector<class_Area_set_gravity_vector>`/:ref:`get_gravity_vector<class_Area_get_gravity_vector>`.
  251. .. _class_Area_set_gravity_vector:
  252. - void **set_gravity_vector** **(** :ref:`Vector3<class_vector3>` vector **)**
  253. Set the gravity vector. This vector does not have to be normalized.
  254. If gravity is a point (see :ref:`is_gravity_a_point<class_Area_is_gravity_a_point>`), this will be the attraction center.
  255. .. _class_Area_set_linear_damp:
  256. - void **set_linear_damp** **(** :ref:`float<class_float>` linear_damp **)**
  257. Set the rate at which objects stop moving in this area, if there are not any other forces moving it. The value is a fraction of its current speed, lost per second. Thus, a value of 1.0 should mean stopping immediately, and 0.0 means the object never stops.
  258. In practice, as the fraction of speed lost gets smaller with each frame, a value of 1.0 does not mean the object will stop in exactly one second. Only when the physics calculations are done at 1 frame per second, it does stop in a second.
  259. .. _class_Area_set_monitorable:
  260. - void **set_monitorable** **(** :ref:`bool<class_bool>` enable **)**
  261. Set whether this area can be detected by other, monitoring, areas. Only areas need to be marked as monitorable. Bodies are always so.
  262. .. _class_Area_set_monitoring:
  263. - void **set_monitoring** **(** :ref:`bool<class_bool>` enable **)**
  264. Set whether this area can detect bodies/areas entering/exiting it.
  265. .. _class_Area_set_priority:
  266. - void **set_priority** **(** :ref:`float<class_float>` priority **)**
  267. Set the order in which the area is processed. Greater values mean the area gets processed first. This is useful for areas which have a space override different from AREA_SPACE_OVERRIDE_DISABLED or AREA_SPACE_OVERRIDE_COMBINE, as they replace values, and are thus order-dependent.
  268. Areas with the same priority value get evaluated in an unpredictable order, and should be differentiated if evaluation order is to be important.
  269. .. _class_Area_set_reverb_amount:
  270. - void **set_reverb_amount** **(** :ref:`float<class_float>` amount **)**
  271. .. _class_Area_set_reverb_bus:
  272. - void **set_reverb_bus** **(** :ref:`String<class_string>` name **)**
  273. .. _class_Area_set_reverb_uniformity:
  274. - void **set_reverb_uniformity** **(** :ref:`float<class_float>` amount **)**
  275. .. _class_Area_set_space_override_mode:
  276. - void **set_space_override_mode** **(** :ref:`int<class_int>` enable **)**
  277. Set the space override mode. This mode controls how an area affects gravity and damp.
  278. AREA_SPACE_OVERRIDE_DISABLED: This area does not affect gravity/damp. These are generally areas that exist only to detect collisions, and objects entering or exiting them.
  279. AREA_SPACE_OVERRIDE_COMBINE: This area adds its gravity/damp values to whatever has been calculated so far. This way, many overlapping areas can combine their physics to make interesting effects.
  280. AREA_SPACE_OVERRIDE_COMBINE_REPLACE: This area adds its gravity/damp values to whatever has been calculated so far. Then stops taking into account the rest of the areas, even the default one.
  281. AREA_SPACE_OVERRIDE_REPLACE: This area replaces any gravity/damp, even the default one, and stops taking into account the rest of the areas.
  282. AREA_SPACE_OVERRIDE_REPLACE_COMBINE: This area replaces any gravity/damp calculated so far, but keeps calculating the rest of the areas, down to the default one.
  283. .. _class_Area_set_use_reverb_bus:
  284. - void **set_use_reverb_bus** **(** :ref:`bool<class_bool>` enable **)**