class_cpuparticles.rst 65 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388
  1. :github_url: hide
  2. .. Generated automatically by doc/tools/makerst.py in Godot's source tree.
  3. .. DO NOT EDIT THIS FILE, but the CPUParticles.xml source instead.
  4. .. The source is found in doc/classes or modules/<name>/doc_classes.
  5. .. _class_CPUParticles:
  6. CPUParticles
  7. ============
  8. **Inherits:** :ref:`GeometryInstance<class_GeometryInstance>` **<** :ref:`VisualInstance<class_VisualInstance>` **<** :ref:`Spatial<class_Spatial>` **<** :ref:`Node<class_Node>` **<** :ref:`Object<class_Object>`
  9. CPU-based 3D particle emitter.
  10. Description
  11. -----------
  12. CPU-based 3D particle node used to create a variety of particle systems and effects.
  13. See also :ref:`Particles<class_Particles>`, which provides the same functionality with hardware acceleration, but may not run on older devices.
  14. **Note:** Unlike :ref:`Particles<class_Particles>`, the visibility rect is generated on-the-fly and doesn't need to be configured by the user.
  15. Properties
  16. ----------
  17. +-------------------------------------------------------+-------------------------------------------------------------------------------------+---------------------------+
  18. | :ref:`int<class_int>` | :ref:`amount<class_CPUParticles_property_amount>` | ``8`` |
  19. +-------------------------------------------------------+-------------------------------------------------------------------------------------+---------------------------+
  20. | :ref:`float<class_float>` | :ref:`angle<class_CPUParticles_property_angle>` | ``0.0`` |
  21. +-------------------------------------------------------+-------------------------------------------------------------------------------------+---------------------------+
  22. | :ref:`Curve<class_Curve>` | :ref:`angle_curve<class_CPUParticles_property_angle_curve>` | |
  23. +-------------------------------------------------------+-------------------------------------------------------------------------------------+---------------------------+
  24. | :ref:`float<class_float>` | :ref:`angle_random<class_CPUParticles_property_angle_random>` | ``0.0`` |
  25. +-------------------------------------------------------+-------------------------------------------------------------------------------------+---------------------------+
  26. | :ref:`float<class_float>` | :ref:`angular_velocity<class_CPUParticles_property_angular_velocity>` | ``0.0`` |
  27. +-------------------------------------------------------+-------------------------------------------------------------------------------------+---------------------------+
  28. | :ref:`Curve<class_Curve>` | :ref:`angular_velocity_curve<class_CPUParticles_property_angular_velocity_curve>` | |
  29. +-------------------------------------------------------+-------------------------------------------------------------------------------------+---------------------------+
  30. | :ref:`float<class_float>` | :ref:`angular_velocity_random<class_CPUParticles_property_angular_velocity_random>` | ``0.0`` |
  31. +-------------------------------------------------------+-------------------------------------------------------------------------------------+---------------------------+
  32. | :ref:`float<class_float>` | :ref:`anim_offset<class_CPUParticles_property_anim_offset>` | ``0.0`` |
  33. +-------------------------------------------------------+-------------------------------------------------------------------------------------+---------------------------+
  34. | :ref:`Curve<class_Curve>` | :ref:`anim_offset_curve<class_CPUParticles_property_anim_offset_curve>` | |
  35. +-------------------------------------------------------+-------------------------------------------------------------------------------------+---------------------------+
  36. | :ref:`float<class_float>` | :ref:`anim_offset_random<class_CPUParticles_property_anim_offset_random>` | ``0.0`` |
  37. +-------------------------------------------------------+-------------------------------------------------------------------------------------+---------------------------+
  38. | :ref:`float<class_float>` | :ref:`anim_speed<class_CPUParticles_property_anim_speed>` | ``0.0`` |
  39. +-------------------------------------------------------+-------------------------------------------------------------------------------------+---------------------------+
  40. | :ref:`Curve<class_Curve>` | :ref:`anim_speed_curve<class_CPUParticles_property_anim_speed_curve>` | |
  41. +-------------------------------------------------------+-------------------------------------------------------------------------------------+---------------------------+
  42. | :ref:`float<class_float>` | :ref:`anim_speed_random<class_CPUParticles_property_anim_speed_random>` | ``0.0`` |
  43. +-------------------------------------------------------+-------------------------------------------------------------------------------------+---------------------------+
  44. | :ref:`Color<class_Color>` | :ref:`color<class_CPUParticles_property_color>` | ``Color( 1, 1, 1, 1 )`` |
  45. +-------------------------------------------------------+-------------------------------------------------------------------------------------+---------------------------+
  46. | :ref:`Gradient<class_Gradient>` | :ref:`color_ramp<class_CPUParticles_property_color_ramp>` | |
  47. +-------------------------------------------------------+-------------------------------------------------------------------------------------+---------------------------+
  48. | :ref:`float<class_float>` | :ref:`damping<class_CPUParticles_property_damping>` | ``0.0`` |
  49. +-------------------------------------------------------+-------------------------------------------------------------------------------------+---------------------------+
  50. | :ref:`Curve<class_Curve>` | :ref:`damping_curve<class_CPUParticles_property_damping_curve>` | |
  51. +-------------------------------------------------------+-------------------------------------------------------------------------------------+---------------------------+
  52. | :ref:`float<class_float>` | :ref:`damping_random<class_CPUParticles_property_damping_random>` | ``0.0`` |
  53. +-------------------------------------------------------+-------------------------------------------------------------------------------------+---------------------------+
  54. | :ref:`Vector3<class_Vector3>` | :ref:`direction<class_CPUParticles_property_direction>` | ``Vector3( 1, 0, 0 )`` |
  55. +-------------------------------------------------------+-------------------------------------------------------------------------------------+---------------------------+
  56. | :ref:`DrawOrder<enum_CPUParticles_DrawOrder>` | :ref:`draw_order<class_CPUParticles_property_draw_order>` | ``0`` |
  57. +-------------------------------------------------------+-------------------------------------------------------------------------------------+---------------------------+
  58. | :ref:`Vector3<class_Vector3>` | :ref:`emission_box_extents<class_CPUParticles_property_emission_box_extents>` | |
  59. +-------------------------------------------------------+-------------------------------------------------------------------------------------+---------------------------+
  60. | :ref:`PoolColorArray<class_PoolColorArray>` | :ref:`emission_colors<class_CPUParticles_property_emission_colors>` | ``PoolColorArray( )`` |
  61. +-------------------------------------------------------+-------------------------------------------------------------------------------------+---------------------------+
  62. | :ref:`PoolVector3Array<class_PoolVector3Array>` | :ref:`emission_normals<class_CPUParticles_property_emission_normals>` | |
  63. +-------------------------------------------------------+-------------------------------------------------------------------------------------+---------------------------+
  64. | :ref:`PoolVector3Array<class_PoolVector3Array>` | :ref:`emission_points<class_CPUParticles_property_emission_points>` | ``PoolVector3Array( )`` |
  65. +-------------------------------------------------------+-------------------------------------------------------------------------------------+---------------------------+
  66. | :ref:`EmissionShape<enum_CPUParticles_EmissionShape>` | :ref:`emission_shape<class_CPUParticles_property_emission_shape>` | ``0`` |
  67. +-------------------------------------------------------+-------------------------------------------------------------------------------------+---------------------------+
  68. | :ref:`float<class_float>` | :ref:`emission_sphere_radius<class_CPUParticles_property_emission_sphere_radius>` | |
  69. +-------------------------------------------------------+-------------------------------------------------------------------------------------+---------------------------+
  70. | :ref:`bool<class_bool>` | :ref:`emitting<class_CPUParticles_property_emitting>` | ``true`` |
  71. +-------------------------------------------------------+-------------------------------------------------------------------------------------+---------------------------+
  72. | :ref:`float<class_float>` | :ref:`explosiveness<class_CPUParticles_property_explosiveness>` | ``0.0`` |
  73. +-------------------------------------------------------+-------------------------------------------------------------------------------------+---------------------------+
  74. | :ref:`int<class_int>` | :ref:`fixed_fps<class_CPUParticles_property_fixed_fps>` | ``0`` |
  75. +-------------------------------------------------------+-------------------------------------------------------------------------------------+---------------------------+
  76. | :ref:`bool<class_bool>` | :ref:`flag_align_y<class_CPUParticles_property_flag_align_y>` | ``false`` |
  77. +-------------------------------------------------------+-------------------------------------------------------------------------------------+---------------------------+
  78. | :ref:`bool<class_bool>` | :ref:`flag_disable_z<class_CPUParticles_property_flag_disable_z>` | ``false`` |
  79. +-------------------------------------------------------+-------------------------------------------------------------------------------------+---------------------------+
  80. | :ref:`bool<class_bool>` | :ref:`flag_rotate_y<class_CPUParticles_property_flag_rotate_y>` | ``false`` |
  81. +-------------------------------------------------------+-------------------------------------------------------------------------------------+---------------------------+
  82. | :ref:`float<class_float>` | :ref:`flatness<class_CPUParticles_property_flatness>` | ``0.0`` |
  83. +-------------------------------------------------------+-------------------------------------------------------------------------------------+---------------------------+
  84. | :ref:`bool<class_bool>` | :ref:`fract_delta<class_CPUParticles_property_fract_delta>` | ``true`` |
  85. +-------------------------------------------------------+-------------------------------------------------------------------------------------+---------------------------+
  86. | :ref:`Vector3<class_Vector3>` | :ref:`gravity<class_CPUParticles_property_gravity>` | ``Vector3( 0, -9.8, 0 )`` |
  87. +-------------------------------------------------------+-------------------------------------------------------------------------------------+---------------------------+
  88. | :ref:`float<class_float>` | :ref:`hue_variation<class_CPUParticles_property_hue_variation>` | ``0.0`` |
  89. +-------------------------------------------------------+-------------------------------------------------------------------------------------+---------------------------+
  90. | :ref:`Curve<class_Curve>` | :ref:`hue_variation_curve<class_CPUParticles_property_hue_variation_curve>` | |
  91. +-------------------------------------------------------+-------------------------------------------------------------------------------------+---------------------------+
  92. | :ref:`float<class_float>` | :ref:`hue_variation_random<class_CPUParticles_property_hue_variation_random>` | ``0.0`` |
  93. +-------------------------------------------------------+-------------------------------------------------------------------------------------+---------------------------+
  94. | :ref:`float<class_float>` | :ref:`initial_velocity<class_CPUParticles_property_initial_velocity>` | ``0.0`` |
  95. +-------------------------------------------------------+-------------------------------------------------------------------------------------+---------------------------+
  96. | :ref:`float<class_float>` | :ref:`initial_velocity_random<class_CPUParticles_property_initial_velocity_random>` | ``0.0`` |
  97. +-------------------------------------------------------+-------------------------------------------------------------------------------------+---------------------------+
  98. | :ref:`float<class_float>` | :ref:`lifetime<class_CPUParticles_property_lifetime>` | ``1.0`` |
  99. +-------------------------------------------------------+-------------------------------------------------------------------------------------+---------------------------+
  100. | :ref:`float<class_float>` | :ref:`lifetime_randomness<class_CPUParticles_property_lifetime_randomness>` | ``0.0`` |
  101. +-------------------------------------------------------+-------------------------------------------------------------------------------------+---------------------------+
  102. | :ref:`float<class_float>` | :ref:`linear_accel<class_CPUParticles_property_linear_accel>` | ``0.0`` |
  103. +-------------------------------------------------------+-------------------------------------------------------------------------------------+---------------------------+
  104. | :ref:`Curve<class_Curve>` | :ref:`linear_accel_curve<class_CPUParticles_property_linear_accel_curve>` | |
  105. +-------------------------------------------------------+-------------------------------------------------------------------------------------+---------------------------+
  106. | :ref:`float<class_float>` | :ref:`linear_accel_random<class_CPUParticles_property_linear_accel_random>` | ``0.0`` |
  107. +-------------------------------------------------------+-------------------------------------------------------------------------------------+---------------------------+
  108. | :ref:`bool<class_bool>` | :ref:`local_coords<class_CPUParticles_property_local_coords>` | ``true`` |
  109. +-------------------------------------------------------+-------------------------------------------------------------------------------------+---------------------------+
  110. | :ref:`Mesh<class_Mesh>` | :ref:`mesh<class_CPUParticles_property_mesh>` | |
  111. +-------------------------------------------------------+-------------------------------------------------------------------------------------+---------------------------+
  112. | :ref:`bool<class_bool>` | :ref:`one_shot<class_CPUParticles_property_one_shot>` | ``false`` |
  113. +-------------------------------------------------------+-------------------------------------------------------------------------------------+---------------------------+
  114. | :ref:`float<class_float>` | :ref:`orbit_velocity<class_CPUParticles_property_orbit_velocity>` | |
  115. +-------------------------------------------------------+-------------------------------------------------------------------------------------+---------------------------+
  116. | :ref:`Curve<class_Curve>` | :ref:`orbit_velocity_curve<class_CPUParticles_property_orbit_velocity_curve>` | |
  117. +-------------------------------------------------------+-------------------------------------------------------------------------------------+---------------------------+
  118. | :ref:`float<class_float>` | :ref:`orbit_velocity_random<class_CPUParticles_property_orbit_velocity_random>` | |
  119. +-------------------------------------------------------+-------------------------------------------------------------------------------------+---------------------------+
  120. | :ref:`float<class_float>` | :ref:`preprocess<class_CPUParticles_property_preprocess>` | ``0.0`` |
  121. +-------------------------------------------------------+-------------------------------------------------------------------------------------+---------------------------+
  122. | :ref:`float<class_float>` | :ref:`radial_accel<class_CPUParticles_property_radial_accel>` | ``0.0`` |
  123. +-------------------------------------------------------+-------------------------------------------------------------------------------------+---------------------------+
  124. | :ref:`Curve<class_Curve>` | :ref:`radial_accel_curve<class_CPUParticles_property_radial_accel_curve>` | |
  125. +-------------------------------------------------------+-------------------------------------------------------------------------------------+---------------------------+
  126. | :ref:`float<class_float>` | :ref:`radial_accel_random<class_CPUParticles_property_radial_accel_random>` | ``0.0`` |
  127. +-------------------------------------------------------+-------------------------------------------------------------------------------------+---------------------------+
  128. | :ref:`float<class_float>` | :ref:`randomness<class_CPUParticles_property_randomness>` | ``0.0`` |
  129. +-------------------------------------------------------+-------------------------------------------------------------------------------------+---------------------------+
  130. | :ref:`float<class_float>` | :ref:`scale_amount<class_CPUParticles_property_scale_amount>` | ``1.0`` |
  131. +-------------------------------------------------------+-------------------------------------------------------------------------------------+---------------------------+
  132. | :ref:`Curve<class_Curve>` | :ref:`scale_amount_curve<class_CPUParticles_property_scale_amount_curve>` | |
  133. +-------------------------------------------------------+-------------------------------------------------------------------------------------+---------------------------+
  134. | :ref:`float<class_float>` | :ref:`scale_amount_random<class_CPUParticles_property_scale_amount_random>` | ``0.0`` |
  135. +-------------------------------------------------------+-------------------------------------------------------------------------------------+---------------------------+
  136. | :ref:`float<class_float>` | :ref:`speed_scale<class_CPUParticles_property_speed_scale>` | ``1.0`` |
  137. +-------------------------------------------------------+-------------------------------------------------------------------------------------+---------------------------+
  138. | :ref:`float<class_float>` | :ref:`spread<class_CPUParticles_property_spread>` | ``45.0`` |
  139. +-------------------------------------------------------+-------------------------------------------------------------------------------------+---------------------------+
  140. | :ref:`float<class_float>` | :ref:`tangential_accel<class_CPUParticles_property_tangential_accel>` | ``0.0`` |
  141. +-------------------------------------------------------+-------------------------------------------------------------------------------------+---------------------------+
  142. | :ref:`Curve<class_Curve>` | :ref:`tangential_accel_curve<class_CPUParticles_property_tangential_accel_curve>` | |
  143. +-------------------------------------------------------+-------------------------------------------------------------------------------------+---------------------------+
  144. | :ref:`float<class_float>` | :ref:`tangential_accel_random<class_CPUParticles_property_tangential_accel_random>` | ``0.0`` |
  145. +-------------------------------------------------------+-------------------------------------------------------------------------------------+---------------------------+
  146. Methods
  147. -------
  148. +---------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  149. | void | :ref:`convert_from_particles<class_CPUParticles_method_convert_from_particles>` **(** :ref:`Node<class_Node>` particles **)** |
  150. +---------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  151. | :ref:`float<class_float>` | :ref:`get_param<class_CPUParticles_method_get_param>` **(** :ref:`Parameter<enum_CPUParticles_Parameter>` param **)** |const| |
  152. +---------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  153. | :ref:`Curve<class_Curve>` | :ref:`get_param_curve<class_CPUParticles_method_get_param_curve>` **(** :ref:`Parameter<enum_CPUParticles_Parameter>` param **)** |const| |
  154. +---------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  155. | :ref:`float<class_float>` | :ref:`get_param_randomness<class_CPUParticles_method_get_param_randomness>` **(** :ref:`Parameter<enum_CPUParticles_Parameter>` param **)** |const| |
  156. +---------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  157. | :ref:`bool<class_bool>` | :ref:`get_particle_flag<class_CPUParticles_method_get_particle_flag>` **(** :ref:`Flags<enum_CPUParticles_Flags>` flag **)** |const| |
  158. +---------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  159. | void | :ref:`restart<class_CPUParticles_method_restart>` **(** **)** |
  160. +---------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  161. | void | :ref:`set_param<class_CPUParticles_method_set_param>` **(** :ref:`Parameter<enum_CPUParticles_Parameter>` param, :ref:`float<class_float>` value **)** |
  162. +---------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  163. | void | :ref:`set_param_curve<class_CPUParticles_method_set_param_curve>` **(** :ref:`Parameter<enum_CPUParticles_Parameter>` param, :ref:`Curve<class_Curve>` curve **)** |
  164. +---------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  165. | void | :ref:`set_param_randomness<class_CPUParticles_method_set_param_randomness>` **(** :ref:`Parameter<enum_CPUParticles_Parameter>` param, :ref:`float<class_float>` randomness **)** |
  166. +---------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  167. | void | :ref:`set_particle_flag<class_CPUParticles_method_set_particle_flag>` **(** :ref:`Flags<enum_CPUParticles_Flags>` flag, :ref:`bool<class_bool>` enable **)** |
  168. +---------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  169. Enumerations
  170. ------------
  171. .. _enum_CPUParticles_DrawOrder:
  172. .. _class_CPUParticles_constant_DRAW_ORDER_INDEX:
  173. .. _class_CPUParticles_constant_DRAW_ORDER_LIFETIME:
  174. .. _class_CPUParticles_constant_DRAW_ORDER_VIEW_DEPTH:
  175. enum **DrawOrder**:
  176. - **DRAW_ORDER_INDEX** = **0** --- Particles are drawn in the order emitted.
  177. - **DRAW_ORDER_LIFETIME** = **1** --- Particles are drawn in order of remaining lifetime.
  178. - **DRAW_ORDER_VIEW_DEPTH** = **2** --- Particles are drawn in order of depth.
  179. ----
  180. .. _enum_CPUParticles_Parameter:
  181. .. _class_CPUParticles_constant_PARAM_INITIAL_LINEAR_VELOCITY:
  182. .. _class_CPUParticles_constant_PARAM_ANGULAR_VELOCITY:
  183. .. _class_CPUParticles_constant_PARAM_ORBIT_VELOCITY:
  184. .. _class_CPUParticles_constant_PARAM_LINEAR_ACCEL:
  185. .. _class_CPUParticles_constant_PARAM_RADIAL_ACCEL:
  186. .. _class_CPUParticles_constant_PARAM_TANGENTIAL_ACCEL:
  187. .. _class_CPUParticles_constant_PARAM_DAMPING:
  188. .. _class_CPUParticles_constant_PARAM_ANGLE:
  189. .. _class_CPUParticles_constant_PARAM_SCALE:
  190. .. _class_CPUParticles_constant_PARAM_HUE_VARIATION:
  191. .. _class_CPUParticles_constant_PARAM_ANIM_SPEED:
  192. .. _class_CPUParticles_constant_PARAM_ANIM_OFFSET:
  193. .. _class_CPUParticles_constant_PARAM_MAX:
  194. enum **Parameter**:
  195. - **PARAM_INITIAL_LINEAR_VELOCITY** = **0** --- Use with :ref:`set_param<class_CPUParticles_method_set_param>`, :ref:`set_param_randomness<class_CPUParticles_method_set_param_randomness>`, and :ref:`set_param_curve<class_CPUParticles_method_set_param_curve>` to set initial velocity properties.
  196. - **PARAM_ANGULAR_VELOCITY** = **1** --- Use with :ref:`set_param<class_CPUParticles_method_set_param>`, :ref:`set_param_randomness<class_CPUParticles_method_set_param_randomness>`, and :ref:`set_param_curve<class_CPUParticles_method_set_param_curve>` to set angular velocity properties.
  197. - **PARAM_ORBIT_VELOCITY** = **2** --- Use with :ref:`set_param<class_CPUParticles_method_set_param>`, :ref:`set_param_randomness<class_CPUParticles_method_set_param_randomness>`, and :ref:`set_param_curve<class_CPUParticles_method_set_param_curve>` to set orbital velocity properties.
  198. - **PARAM_LINEAR_ACCEL** = **3** --- Use with :ref:`set_param<class_CPUParticles_method_set_param>`, :ref:`set_param_randomness<class_CPUParticles_method_set_param_randomness>`, and :ref:`set_param_curve<class_CPUParticles_method_set_param_curve>` to set linear acceleration properties.
  199. - **PARAM_RADIAL_ACCEL** = **4** --- Use with :ref:`set_param<class_CPUParticles_method_set_param>`, :ref:`set_param_randomness<class_CPUParticles_method_set_param_randomness>`, and :ref:`set_param_curve<class_CPUParticles_method_set_param_curve>` to set radial acceleration properties.
  200. - **PARAM_TANGENTIAL_ACCEL** = **5** --- Use with :ref:`set_param<class_CPUParticles_method_set_param>`, :ref:`set_param_randomness<class_CPUParticles_method_set_param_randomness>`, and :ref:`set_param_curve<class_CPUParticles_method_set_param_curve>` to set tangential acceleration properties.
  201. - **PARAM_DAMPING** = **6** --- Use with :ref:`set_param<class_CPUParticles_method_set_param>`, :ref:`set_param_randomness<class_CPUParticles_method_set_param_randomness>`, and :ref:`set_param_curve<class_CPUParticles_method_set_param_curve>` to set damping properties.
  202. - **PARAM_ANGLE** = **7** --- Use with :ref:`set_param<class_CPUParticles_method_set_param>`, :ref:`set_param_randomness<class_CPUParticles_method_set_param_randomness>`, and :ref:`set_param_curve<class_CPUParticles_method_set_param_curve>` to set angle properties.
  203. - **PARAM_SCALE** = **8** --- Use with :ref:`set_param<class_CPUParticles_method_set_param>`, :ref:`set_param_randomness<class_CPUParticles_method_set_param_randomness>`, and :ref:`set_param_curve<class_CPUParticles_method_set_param_curve>` to set scale properties.
  204. - **PARAM_HUE_VARIATION** = **9** --- Use with :ref:`set_param<class_CPUParticles_method_set_param>`, :ref:`set_param_randomness<class_CPUParticles_method_set_param_randomness>`, and :ref:`set_param_curve<class_CPUParticles_method_set_param_curve>` to set hue variation properties.
  205. - **PARAM_ANIM_SPEED** = **10** --- Use with :ref:`set_param<class_CPUParticles_method_set_param>`, :ref:`set_param_randomness<class_CPUParticles_method_set_param_randomness>`, and :ref:`set_param_curve<class_CPUParticles_method_set_param_curve>` to set animation speed properties.
  206. - **PARAM_ANIM_OFFSET** = **11** --- Use with :ref:`set_param<class_CPUParticles_method_set_param>`, :ref:`set_param_randomness<class_CPUParticles_method_set_param_randomness>`, and :ref:`set_param_curve<class_CPUParticles_method_set_param_curve>` to set animation offset properties.
  207. - **PARAM_MAX** = **12** --- Represents the size of the :ref:`Parameter<enum_CPUParticles_Parameter>` enum.
  208. ----
  209. .. _enum_CPUParticles_Flags:
  210. .. _class_CPUParticles_constant_FLAG_ALIGN_Y_TO_VELOCITY:
  211. .. _class_CPUParticles_constant_FLAG_ROTATE_Y:
  212. .. _class_CPUParticles_constant_FLAG_DISABLE_Z:
  213. .. _class_CPUParticles_constant_FLAG_MAX:
  214. enum **Flags**:
  215. - **FLAG_ALIGN_Y_TO_VELOCITY** = **0** --- Use with :ref:`set_particle_flag<class_CPUParticles_method_set_particle_flag>` to set :ref:`flag_align_y<class_CPUParticles_property_flag_align_y>`.
  216. - **FLAG_ROTATE_Y** = **1** --- Use with :ref:`set_particle_flag<class_CPUParticles_method_set_particle_flag>` to set :ref:`flag_rotate_y<class_CPUParticles_property_flag_rotate_y>`.
  217. - **FLAG_DISABLE_Z** = **2** --- Use with :ref:`set_particle_flag<class_CPUParticles_method_set_particle_flag>` to set :ref:`flag_disable_z<class_CPUParticles_property_flag_disable_z>`.
  218. - **FLAG_MAX** = **3** --- Represents the size of the :ref:`Flags<enum_CPUParticles_Flags>` enum.
  219. ----
  220. .. _enum_CPUParticles_EmissionShape:
  221. .. _class_CPUParticles_constant_EMISSION_SHAPE_POINT:
  222. .. _class_CPUParticles_constant_EMISSION_SHAPE_SPHERE:
  223. .. _class_CPUParticles_constant_EMISSION_SHAPE_BOX:
  224. .. _class_CPUParticles_constant_EMISSION_SHAPE_POINTS:
  225. .. _class_CPUParticles_constant_EMISSION_SHAPE_DIRECTED_POINTS:
  226. .. _class_CPUParticles_constant_EMISSION_SHAPE_MAX:
  227. enum **EmissionShape**:
  228. - **EMISSION_SHAPE_POINT** = **0** --- All particles will be emitted from a single point.
  229. - **EMISSION_SHAPE_SPHERE** = **1** --- Particles will be emitted in the volume of a sphere.
  230. - **EMISSION_SHAPE_BOX** = **2** --- Particles will be emitted in the volume of a box.
  231. - **EMISSION_SHAPE_POINTS** = **3** --- Particles will be emitted at a position chosen randomly among :ref:`emission_points<class_CPUParticles_property_emission_points>`. Particle color will be modulated by :ref:`emission_colors<class_CPUParticles_property_emission_colors>`.
  232. - **EMISSION_SHAPE_DIRECTED_POINTS** = **4** --- Particles will be emitted at a position chosen randomly among :ref:`emission_points<class_CPUParticles_property_emission_points>`. Particle velocity and rotation will be set based on :ref:`emission_normals<class_CPUParticles_property_emission_normals>`. Particle color will be modulated by :ref:`emission_colors<class_CPUParticles_property_emission_colors>`.
  233. - **EMISSION_SHAPE_MAX** = **5** --- Represents the size of the :ref:`EmissionShape<enum_CPUParticles_EmissionShape>` enum.
  234. Property Descriptions
  235. ---------------------
  236. .. _class_CPUParticles_property_amount:
  237. - :ref:`int<class_int>` **amount**
  238. +-----------+-------------------+
  239. | *Default* | ``8`` |
  240. +-----------+-------------------+
  241. | *Setter* | set_amount(value) |
  242. +-----------+-------------------+
  243. | *Getter* | get_amount() |
  244. +-----------+-------------------+
  245. The number of particles emitted in one emission cycle (corresponding to the :ref:`lifetime<class_CPUParticles_property_lifetime>`).
  246. **Note:** Changing :ref:`amount<class_CPUParticles_property_amount>` will reset the particle emission, therefore removing all particles that were already emitted before changing :ref:`amount<class_CPUParticles_property_amount>`.
  247. ----
  248. .. _class_CPUParticles_property_angle:
  249. - :ref:`float<class_float>` **angle**
  250. +-----------+------------------+
  251. | *Default* | ``0.0`` |
  252. +-----------+------------------+
  253. | *Setter* | set_param(value) |
  254. +-----------+------------------+
  255. | *Getter* | get_param() |
  256. +-----------+------------------+
  257. Initial rotation applied to each particle, in degrees.
  258. ----
  259. .. _class_CPUParticles_property_angle_curve:
  260. - :ref:`Curve<class_Curve>` **angle_curve**
  261. +----------+------------------------+
  262. | *Setter* | set_param_curve(value) |
  263. +----------+------------------------+
  264. | *Getter* | get_param_curve() |
  265. +----------+------------------------+
  266. Each particle's rotation will be animated along this :ref:`Curve<class_Curve>`.
  267. ----
  268. .. _class_CPUParticles_property_angle_random:
  269. - :ref:`float<class_float>` **angle_random**
  270. +-----------+-----------------------------+
  271. | *Default* | ``0.0`` |
  272. +-----------+-----------------------------+
  273. | *Setter* | set_param_randomness(value) |
  274. +-----------+-----------------------------+
  275. | *Getter* | get_param_randomness() |
  276. +-----------+-----------------------------+
  277. Rotation randomness ratio.
  278. ----
  279. .. _class_CPUParticles_property_angular_velocity:
  280. - :ref:`float<class_float>` **angular_velocity**
  281. +-----------+------------------+
  282. | *Default* | ``0.0`` |
  283. +-----------+------------------+
  284. | *Setter* | set_param(value) |
  285. +-----------+------------------+
  286. | *Getter* | get_param() |
  287. +-----------+------------------+
  288. Initial angular velocity applied to each particle. Sets the speed of rotation of the particle.
  289. ----
  290. .. _class_CPUParticles_property_angular_velocity_curve:
  291. - :ref:`Curve<class_Curve>` **angular_velocity_curve**
  292. +----------+------------------------+
  293. | *Setter* | set_param_curve(value) |
  294. +----------+------------------------+
  295. | *Getter* | get_param_curve() |
  296. +----------+------------------------+
  297. Each particle's angular velocity will vary along this :ref:`Curve<class_Curve>`.
  298. ----
  299. .. _class_CPUParticles_property_angular_velocity_random:
  300. - :ref:`float<class_float>` **angular_velocity_random**
  301. +-----------+-----------------------------+
  302. | *Default* | ``0.0`` |
  303. +-----------+-----------------------------+
  304. | *Setter* | set_param_randomness(value) |
  305. +-----------+-----------------------------+
  306. | *Getter* | get_param_randomness() |
  307. +-----------+-----------------------------+
  308. Angular velocity randomness ratio.
  309. ----
  310. .. _class_CPUParticles_property_anim_offset:
  311. - :ref:`float<class_float>` **anim_offset**
  312. +-----------+------------------+
  313. | *Default* | ``0.0`` |
  314. +-----------+------------------+
  315. | *Setter* | set_param(value) |
  316. +-----------+------------------+
  317. | *Getter* | get_param() |
  318. +-----------+------------------+
  319. Particle animation offset.
  320. ----
  321. .. _class_CPUParticles_property_anim_offset_curve:
  322. - :ref:`Curve<class_Curve>` **anim_offset_curve**
  323. +----------+------------------------+
  324. | *Setter* | set_param_curve(value) |
  325. +----------+------------------------+
  326. | *Getter* | get_param_curve() |
  327. +----------+------------------------+
  328. Each particle's animation offset will vary along this :ref:`Curve<class_Curve>`.
  329. ----
  330. .. _class_CPUParticles_property_anim_offset_random:
  331. - :ref:`float<class_float>` **anim_offset_random**
  332. +-----------+-----------------------------+
  333. | *Default* | ``0.0`` |
  334. +-----------+-----------------------------+
  335. | *Setter* | set_param_randomness(value) |
  336. +-----------+-----------------------------+
  337. | *Getter* | get_param_randomness() |
  338. +-----------+-----------------------------+
  339. Animation offset randomness ratio.
  340. ----
  341. .. _class_CPUParticles_property_anim_speed:
  342. - :ref:`float<class_float>` **anim_speed**
  343. +-----------+------------------+
  344. | *Default* | ``0.0`` |
  345. +-----------+------------------+
  346. | *Setter* | set_param(value) |
  347. +-----------+------------------+
  348. | *Getter* | get_param() |
  349. +-----------+------------------+
  350. Particle animation speed.
  351. ----
  352. .. _class_CPUParticles_property_anim_speed_curve:
  353. - :ref:`Curve<class_Curve>` **anim_speed_curve**
  354. +----------+------------------------+
  355. | *Setter* | set_param_curve(value) |
  356. +----------+------------------------+
  357. | *Getter* | get_param_curve() |
  358. +----------+------------------------+
  359. Each particle's animation speed will vary along this :ref:`Curve<class_Curve>`.
  360. ----
  361. .. _class_CPUParticles_property_anim_speed_random:
  362. - :ref:`float<class_float>` **anim_speed_random**
  363. +-----------+-----------------------------+
  364. | *Default* | ``0.0`` |
  365. +-----------+-----------------------------+
  366. | *Setter* | set_param_randomness(value) |
  367. +-----------+-----------------------------+
  368. | *Getter* | get_param_randomness() |
  369. +-----------+-----------------------------+
  370. Animation speed randomness ratio.
  371. ----
  372. .. _class_CPUParticles_property_color:
  373. - :ref:`Color<class_Color>` **color**
  374. +-----------+-------------------------+
  375. | *Default* | ``Color( 1, 1, 1, 1 )`` |
  376. +-----------+-------------------------+
  377. | *Setter* | set_color(value) |
  378. +-----------+-------------------------+
  379. | *Getter* | get_color() |
  380. +-----------+-------------------------+
  381. Unused for 3D particles.
  382. ----
  383. .. _class_CPUParticles_property_color_ramp:
  384. - :ref:`Gradient<class_Gradient>` **color_ramp**
  385. +----------+-----------------------+
  386. | *Setter* | set_color_ramp(value) |
  387. +----------+-----------------------+
  388. | *Getter* | get_color_ramp() |
  389. +----------+-----------------------+
  390. Unused for 3D particles.
  391. ----
  392. .. _class_CPUParticles_property_damping:
  393. - :ref:`float<class_float>` **damping**
  394. +-----------+------------------+
  395. | *Default* | ``0.0`` |
  396. +-----------+------------------+
  397. | *Setter* | set_param(value) |
  398. +-----------+------------------+
  399. | *Getter* | get_param() |
  400. +-----------+------------------+
  401. The rate at which particles lose velocity.
  402. ----
  403. .. _class_CPUParticles_property_damping_curve:
  404. - :ref:`Curve<class_Curve>` **damping_curve**
  405. +----------+------------------------+
  406. | *Setter* | set_param_curve(value) |
  407. +----------+------------------------+
  408. | *Getter* | get_param_curve() |
  409. +----------+------------------------+
  410. Damping will vary along this :ref:`Curve<class_Curve>`.
  411. ----
  412. .. _class_CPUParticles_property_damping_random:
  413. - :ref:`float<class_float>` **damping_random**
  414. +-----------+-----------------------------+
  415. | *Default* | ``0.0`` |
  416. +-----------+-----------------------------+
  417. | *Setter* | set_param_randomness(value) |
  418. +-----------+-----------------------------+
  419. | *Getter* | get_param_randomness() |
  420. +-----------+-----------------------------+
  421. Damping randomness ratio.
  422. ----
  423. .. _class_CPUParticles_property_direction:
  424. - :ref:`Vector3<class_Vector3>` **direction**
  425. +-----------+------------------------+
  426. | *Default* | ``Vector3( 1, 0, 0 )`` |
  427. +-----------+------------------------+
  428. | *Setter* | set_direction(value) |
  429. +-----------+------------------------+
  430. | *Getter* | get_direction() |
  431. +-----------+------------------------+
  432. Unit vector specifying the particles' emission direction.
  433. ----
  434. .. _class_CPUParticles_property_draw_order:
  435. - :ref:`DrawOrder<enum_CPUParticles_DrawOrder>` **draw_order**
  436. +-----------+-----------------------+
  437. | *Default* | ``0`` |
  438. +-----------+-----------------------+
  439. | *Setter* | set_draw_order(value) |
  440. +-----------+-----------------------+
  441. | *Getter* | get_draw_order() |
  442. +-----------+-----------------------+
  443. Particle draw order. Uses :ref:`DrawOrder<enum_CPUParticles_DrawOrder>` values.
  444. ----
  445. .. _class_CPUParticles_property_emission_box_extents:
  446. - :ref:`Vector3<class_Vector3>` **emission_box_extents**
  447. +----------+---------------------------------+
  448. | *Setter* | set_emission_box_extents(value) |
  449. +----------+---------------------------------+
  450. | *Getter* | get_emission_box_extents() |
  451. +----------+---------------------------------+
  452. The rectangle's extents if :ref:`emission_shape<class_CPUParticles_property_emission_shape>` is set to :ref:`EMISSION_SHAPE_BOX<class_CPUParticles_constant_EMISSION_SHAPE_BOX>`.
  453. ----
  454. .. _class_CPUParticles_property_emission_colors:
  455. - :ref:`PoolColorArray<class_PoolColorArray>` **emission_colors**
  456. +-----------+----------------------------+
  457. | *Default* | ``PoolColorArray( )`` |
  458. +-----------+----------------------------+
  459. | *Setter* | set_emission_colors(value) |
  460. +-----------+----------------------------+
  461. | *Getter* | get_emission_colors() |
  462. +-----------+----------------------------+
  463. Sets the :ref:`Color<class_Color>`\ s to modulate particles by when using :ref:`EMISSION_SHAPE_POINTS<class_CPUParticles_constant_EMISSION_SHAPE_POINTS>` or :ref:`EMISSION_SHAPE_DIRECTED_POINTS<class_CPUParticles_constant_EMISSION_SHAPE_DIRECTED_POINTS>`.
  464. ----
  465. .. _class_CPUParticles_property_emission_normals:
  466. - :ref:`PoolVector3Array<class_PoolVector3Array>` **emission_normals**
  467. +----------+-----------------------------+
  468. | *Setter* | set_emission_normals(value) |
  469. +----------+-----------------------------+
  470. | *Getter* | get_emission_normals() |
  471. +----------+-----------------------------+
  472. Sets the direction the particles will be emitted in when using :ref:`EMISSION_SHAPE_DIRECTED_POINTS<class_CPUParticles_constant_EMISSION_SHAPE_DIRECTED_POINTS>`.
  473. ----
  474. .. _class_CPUParticles_property_emission_points:
  475. - :ref:`PoolVector3Array<class_PoolVector3Array>` **emission_points**
  476. +-----------+----------------------------+
  477. | *Default* | ``PoolVector3Array( )`` |
  478. +-----------+----------------------------+
  479. | *Setter* | set_emission_points(value) |
  480. +-----------+----------------------------+
  481. | *Getter* | get_emission_points() |
  482. +-----------+----------------------------+
  483. Sets the initial positions to spawn particles when using :ref:`EMISSION_SHAPE_POINTS<class_CPUParticles_constant_EMISSION_SHAPE_POINTS>` or :ref:`EMISSION_SHAPE_DIRECTED_POINTS<class_CPUParticles_constant_EMISSION_SHAPE_DIRECTED_POINTS>`.
  484. ----
  485. .. _class_CPUParticles_property_emission_shape:
  486. - :ref:`EmissionShape<enum_CPUParticles_EmissionShape>` **emission_shape**
  487. +-----------+---------------------------+
  488. | *Default* | ``0`` |
  489. +-----------+---------------------------+
  490. | *Setter* | set_emission_shape(value) |
  491. +-----------+---------------------------+
  492. | *Getter* | get_emission_shape() |
  493. +-----------+---------------------------+
  494. Particles will be emitted inside this region. See :ref:`EmissionShape<enum_CPUParticles_EmissionShape>` for possible values.
  495. ----
  496. .. _class_CPUParticles_property_emission_sphere_radius:
  497. - :ref:`float<class_float>` **emission_sphere_radius**
  498. +----------+-----------------------------------+
  499. | *Setter* | set_emission_sphere_radius(value) |
  500. +----------+-----------------------------------+
  501. | *Getter* | get_emission_sphere_radius() |
  502. +----------+-----------------------------------+
  503. The sphere's radius if :ref:`EmissionShape<enum_CPUParticles_EmissionShape>` is set to :ref:`EMISSION_SHAPE_SPHERE<class_CPUParticles_constant_EMISSION_SHAPE_SPHERE>`.
  504. ----
  505. .. _class_CPUParticles_property_emitting:
  506. - :ref:`bool<class_bool>` **emitting**
  507. +-----------+---------------------+
  508. | *Default* | ``true`` |
  509. +-----------+---------------------+
  510. | *Setter* | set_emitting(value) |
  511. +-----------+---------------------+
  512. | *Getter* | is_emitting() |
  513. +-----------+---------------------+
  514. If ``true``, particles are being emitted.
  515. ----
  516. .. _class_CPUParticles_property_explosiveness:
  517. - :ref:`float<class_float>` **explosiveness**
  518. +-----------+--------------------------------+
  519. | *Default* | ``0.0`` |
  520. +-----------+--------------------------------+
  521. | *Setter* | set_explosiveness_ratio(value) |
  522. +-----------+--------------------------------+
  523. | *Getter* | get_explosiveness_ratio() |
  524. +-----------+--------------------------------+
  525. How rapidly particles in an emission cycle are emitted. If greater than ``0``, there will be a gap in emissions before the next cycle begins.
  526. ----
  527. .. _class_CPUParticles_property_fixed_fps:
  528. - :ref:`int<class_int>` **fixed_fps**
  529. +-----------+----------------------+
  530. | *Default* | ``0`` |
  531. +-----------+----------------------+
  532. | *Setter* | set_fixed_fps(value) |
  533. +-----------+----------------------+
  534. | *Getter* | get_fixed_fps() |
  535. +-----------+----------------------+
  536. The particle system's frame rate is fixed to a value. For instance, changing the value to 2 will make the particles render at 2 frames per second. Note this does not slow down the particle system itself.
  537. ----
  538. .. _class_CPUParticles_property_flag_align_y:
  539. - :ref:`bool<class_bool>` **flag_align_y**
  540. +-----------+--------------------------+
  541. | *Default* | ``false`` |
  542. +-----------+--------------------------+
  543. | *Setter* | set_particle_flag(value) |
  544. +-----------+--------------------------+
  545. | *Getter* | get_particle_flag() |
  546. +-----------+--------------------------+
  547. Align Y axis of particle with the direction of its velocity.
  548. ----
  549. .. _class_CPUParticles_property_flag_disable_z:
  550. - :ref:`bool<class_bool>` **flag_disable_z**
  551. +-----------+--------------------------+
  552. | *Default* | ``false`` |
  553. +-----------+--------------------------+
  554. | *Setter* | set_particle_flag(value) |
  555. +-----------+--------------------------+
  556. | *Getter* | get_particle_flag() |
  557. +-----------+--------------------------+
  558. If ``true``, particles will not move on the z axis.
  559. ----
  560. .. _class_CPUParticles_property_flag_rotate_y:
  561. - :ref:`bool<class_bool>` **flag_rotate_y**
  562. +-----------+--------------------------+
  563. | *Default* | ``false`` |
  564. +-----------+--------------------------+
  565. | *Setter* | set_particle_flag(value) |
  566. +-----------+--------------------------+
  567. | *Getter* | get_particle_flag() |
  568. +-----------+--------------------------+
  569. If ``true``, particles rotate around Y axis by :ref:`angle<class_CPUParticles_property_angle>`.
  570. ----
  571. .. _class_CPUParticles_property_flatness:
  572. - :ref:`float<class_float>` **flatness**
  573. +-----------+---------------------+
  574. | *Default* | ``0.0`` |
  575. +-----------+---------------------+
  576. | *Setter* | set_flatness(value) |
  577. +-----------+---------------------+
  578. | *Getter* | get_flatness() |
  579. +-----------+---------------------+
  580. Amount of :ref:`spread<class_CPUParticles_property_spread>` in Y/Z plane. A value of ``1`` restricts particles to X/Z plane.
  581. ----
  582. .. _class_CPUParticles_property_fract_delta:
  583. - :ref:`bool<class_bool>` **fract_delta**
  584. +-----------+-----------------------------+
  585. | *Default* | ``true`` |
  586. +-----------+-----------------------------+
  587. | *Setter* | set_fractional_delta(value) |
  588. +-----------+-----------------------------+
  589. | *Getter* | get_fractional_delta() |
  590. +-----------+-----------------------------+
  591. If ``true``, results in fractional delta calculation which has a smoother particles display effect.
  592. ----
  593. .. _class_CPUParticles_property_gravity:
  594. - :ref:`Vector3<class_Vector3>` **gravity**
  595. +-----------+---------------------------+
  596. | *Default* | ``Vector3( 0, -9.8, 0 )`` |
  597. +-----------+---------------------------+
  598. | *Setter* | set_gravity(value) |
  599. +-----------+---------------------------+
  600. | *Getter* | get_gravity() |
  601. +-----------+---------------------------+
  602. Gravity applied to every particle.
  603. ----
  604. .. _class_CPUParticles_property_hue_variation:
  605. - :ref:`float<class_float>` **hue_variation**
  606. +-----------+------------------+
  607. | *Default* | ``0.0`` |
  608. +-----------+------------------+
  609. | *Setter* | set_param(value) |
  610. +-----------+------------------+
  611. | *Getter* | get_param() |
  612. +-----------+------------------+
  613. Initial hue variation applied to each particle.
  614. ----
  615. .. _class_CPUParticles_property_hue_variation_curve:
  616. - :ref:`Curve<class_Curve>` **hue_variation_curve**
  617. +----------+------------------------+
  618. | *Setter* | set_param_curve(value) |
  619. +----------+------------------------+
  620. | *Getter* | get_param_curve() |
  621. +----------+------------------------+
  622. Each particle's hue will vary along this :ref:`Curve<class_Curve>`.
  623. ----
  624. .. _class_CPUParticles_property_hue_variation_random:
  625. - :ref:`float<class_float>` **hue_variation_random**
  626. +-----------+-----------------------------+
  627. | *Default* | ``0.0`` |
  628. +-----------+-----------------------------+
  629. | *Setter* | set_param_randomness(value) |
  630. +-----------+-----------------------------+
  631. | *Getter* | get_param_randomness() |
  632. +-----------+-----------------------------+
  633. Hue variation randomness ratio.
  634. ----
  635. .. _class_CPUParticles_property_initial_velocity:
  636. - :ref:`float<class_float>` **initial_velocity**
  637. +-----------+------------------+
  638. | *Default* | ``0.0`` |
  639. +-----------+------------------+
  640. | *Setter* | set_param(value) |
  641. +-----------+------------------+
  642. | *Getter* | get_param() |
  643. +-----------+------------------+
  644. Initial velocity magnitude for each particle. Direction comes from :ref:`spread<class_CPUParticles_property_spread>` and the node's orientation.
  645. ----
  646. .. _class_CPUParticles_property_initial_velocity_random:
  647. - :ref:`float<class_float>` **initial_velocity_random**
  648. +-----------+-----------------------------+
  649. | *Default* | ``0.0`` |
  650. +-----------+-----------------------------+
  651. | *Setter* | set_param_randomness(value) |
  652. +-----------+-----------------------------+
  653. | *Getter* | get_param_randomness() |
  654. +-----------+-----------------------------+
  655. Initial velocity randomness ratio.
  656. ----
  657. .. _class_CPUParticles_property_lifetime:
  658. - :ref:`float<class_float>` **lifetime**
  659. +-----------+---------------------+
  660. | *Default* | ``1.0`` |
  661. +-----------+---------------------+
  662. | *Setter* | set_lifetime(value) |
  663. +-----------+---------------------+
  664. | *Getter* | get_lifetime() |
  665. +-----------+---------------------+
  666. The amount of time each particle will exist (in seconds).
  667. ----
  668. .. _class_CPUParticles_property_lifetime_randomness:
  669. - :ref:`float<class_float>` **lifetime_randomness**
  670. +-----------+--------------------------------+
  671. | *Default* | ``0.0`` |
  672. +-----------+--------------------------------+
  673. | *Setter* | set_lifetime_randomness(value) |
  674. +-----------+--------------------------------+
  675. | *Getter* | get_lifetime_randomness() |
  676. +-----------+--------------------------------+
  677. Particle lifetime randomness ratio.
  678. ----
  679. .. _class_CPUParticles_property_linear_accel:
  680. - :ref:`float<class_float>` **linear_accel**
  681. +-----------+------------------+
  682. | *Default* | ``0.0`` |
  683. +-----------+------------------+
  684. | *Setter* | set_param(value) |
  685. +-----------+------------------+
  686. | *Getter* | get_param() |
  687. +-----------+------------------+
  688. Linear acceleration applied to each particle in the direction of motion.
  689. ----
  690. .. _class_CPUParticles_property_linear_accel_curve:
  691. - :ref:`Curve<class_Curve>` **linear_accel_curve**
  692. +----------+------------------------+
  693. | *Setter* | set_param_curve(value) |
  694. +----------+------------------------+
  695. | *Getter* | get_param_curve() |
  696. +----------+------------------------+
  697. Each particle's linear acceleration will vary along this :ref:`Curve<class_Curve>`.
  698. ----
  699. .. _class_CPUParticles_property_linear_accel_random:
  700. - :ref:`float<class_float>` **linear_accel_random**
  701. +-----------+-----------------------------+
  702. | *Default* | ``0.0`` |
  703. +-----------+-----------------------------+
  704. | *Setter* | set_param_randomness(value) |
  705. +-----------+-----------------------------+
  706. | *Getter* | get_param_randomness() |
  707. +-----------+-----------------------------+
  708. Linear acceleration randomness ratio.
  709. ----
  710. .. _class_CPUParticles_property_local_coords:
  711. - :ref:`bool<class_bool>` **local_coords**
  712. +-----------+----------------------------------+
  713. | *Default* | ``true`` |
  714. +-----------+----------------------------------+
  715. | *Setter* | set_use_local_coordinates(value) |
  716. +-----------+----------------------------------+
  717. | *Getter* | get_use_local_coordinates() |
  718. +-----------+----------------------------------+
  719. If ``true``, particles use the parent node's coordinate space. If ``false``, they use global coordinates.
  720. ----
  721. .. _class_CPUParticles_property_mesh:
  722. - :ref:`Mesh<class_Mesh>` **mesh**
  723. +----------+-----------------+
  724. | *Setter* | set_mesh(value) |
  725. +----------+-----------------+
  726. | *Getter* | get_mesh() |
  727. +----------+-----------------+
  728. The :ref:`Mesh<class_Mesh>` used for each particle. If ``null``, particles will be spheres.
  729. ----
  730. .. _class_CPUParticles_property_one_shot:
  731. - :ref:`bool<class_bool>` **one_shot**
  732. +-----------+---------------------+
  733. | *Default* | ``false`` |
  734. +-----------+---------------------+
  735. | *Setter* | set_one_shot(value) |
  736. +-----------+---------------------+
  737. | *Getter* | get_one_shot() |
  738. +-----------+---------------------+
  739. If ``true``, only one emission cycle occurs. If set ``true`` during a cycle, emission will stop at the cycle's end.
  740. ----
  741. .. _class_CPUParticles_property_orbit_velocity:
  742. - :ref:`float<class_float>` **orbit_velocity**
  743. +----------+------------------+
  744. | *Setter* | set_param(value) |
  745. +----------+------------------+
  746. | *Getter* | get_param() |
  747. +----------+------------------+
  748. Orbital velocity applied to each particle. Makes the particles circle around origin in the local XY plane. Specified in number of full rotations around origin per second.
  749. This property is only available when :ref:`flag_disable_z<class_CPUParticles_property_flag_disable_z>` is ``true``.
  750. ----
  751. .. _class_CPUParticles_property_orbit_velocity_curve:
  752. - :ref:`Curve<class_Curve>` **orbit_velocity_curve**
  753. +----------+------------------------+
  754. | *Setter* | set_param_curve(value) |
  755. +----------+------------------------+
  756. | *Getter* | get_param_curve() |
  757. +----------+------------------------+
  758. Each particle's orbital velocity will vary along this :ref:`Curve<class_Curve>`.
  759. ----
  760. .. _class_CPUParticles_property_orbit_velocity_random:
  761. - :ref:`float<class_float>` **orbit_velocity_random**
  762. +----------+-----------------------------+
  763. | *Setter* | set_param_randomness(value) |
  764. +----------+-----------------------------+
  765. | *Getter* | get_param_randomness() |
  766. +----------+-----------------------------+
  767. Orbital velocity randomness ratio.
  768. ----
  769. .. _class_CPUParticles_property_preprocess:
  770. - :ref:`float<class_float>` **preprocess**
  771. +-----------+-----------------------------+
  772. | *Default* | ``0.0`` |
  773. +-----------+-----------------------------+
  774. | *Setter* | set_pre_process_time(value) |
  775. +-----------+-----------------------------+
  776. | *Getter* | get_pre_process_time() |
  777. +-----------+-----------------------------+
  778. Particle system starts as if it had already run for this many seconds.
  779. ----
  780. .. _class_CPUParticles_property_radial_accel:
  781. - :ref:`float<class_float>` **radial_accel**
  782. +-----------+------------------+
  783. | *Default* | ``0.0`` |
  784. +-----------+------------------+
  785. | *Setter* | set_param(value) |
  786. +-----------+------------------+
  787. | *Getter* | get_param() |
  788. +-----------+------------------+
  789. Radial acceleration applied to each particle. Makes particle accelerate away from origin.
  790. ----
  791. .. _class_CPUParticles_property_radial_accel_curve:
  792. - :ref:`Curve<class_Curve>` **radial_accel_curve**
  793. +----------+------------------------+
  794. | *Setter* | set_param_curve(value) |
  795. +----------+------------------------+
  796. | *Getter* | get_param_curve() |
  797. +----------+------------------------+
  798. Each particle's radial acceleration will vary along this :ref:`Curve<class_Curve>`.
  799. ----
  800. .. _class_CPUParticles_property_radial_accel_random:
  801. - :ref:`float<class_float>` **radial_accel_random**
  802. +-----------+-----------------------------+
  803. | *Default* | ``0.0`` |
  804. +-----------+-----------------------------+
  805. | *Setter* | set_param_randomness(value) |
  806. +-----------+-----------------------------+
  807. | *Getter* | get_param_randomness() |
  808. +-----------+-----------------------------+
  809. Radial acceleration randomness ratio.
  810. ----
  811. .. _class_CPUParticles_property_randomness:
  812. - :ref:`float<class_float>` **randomness**
  813. +-----------+-----------------------------+
  814. | *Default* | ``0.0`` |
  815. +-----------+-----------------------------+
  816. | *Setter* | set_randomness_ratio(value) |
  817. +-----------+-----------------------------+
  818. | *Getter* | get_randomness_ratio() |
  819. +-----------+-----------------------------+
  820. Emission lifetime randomness ratio.
  821. ----
  822. .. _class_CPUParticles_property_scale_amount:
  823. - :ref:`float<class_float>` **scale_amount**
  824. +-----------+------------------+
  825. | *Default* | ``1.0`` |
  826. +-----------+------------------+
  827. | *Setter* | set_param(value) |
  828. +-----------+------------------+
  829. | *Getter* | get_param() |
  830. +-----------+------------------+
  831. Initial scale applied to each particle.
  832. ----
  833. .. _class_CPUParticles_property_scale_amount_curve:
  834. - :ref:`Curve<class_Curve>` **scale_amount_curve**
  835. +----------+------------------------+
  836. | *Setter* | set_param_curve(value) |
  837. +----------+------------------------+
  838. | *Getter* | get_param_curve() |
  839. +----------+------------------------+
  840. Each particle's scale will vary along this :ref:`Curve<class_Curve>`.
  841. ----
  842. .. _class_CPUParticles_property_scale_amount_random:
  843. - :ref:`float<class_float>` **scale_amount_random**
  844. +-----------+-----------------------------+
  845. | *Default* | ``0.0`` |
  846. +-----------+-----------------------------+
  847. | *Setter* | set_param_randomness(value) |
  848. +-----------+-----------------------------+
  849. | *Getter* | get_param_randomness() |
  850. +-----------+-----------------------------+
  851. Scale randomness ratio.
  852. ----
  853. .. _class_CPUParticles_property_speed_scale:
  854. - :ref:`float<class_float>` **speed_scale**
  855. +-----------+------------------------+
  856. | *Default* | ``1.0`` |
  857. +-----------+------------------------+
  858. | *Setter* | set_speed_scale(value) |
  859. +-----------+------------------------+
  860. | *Getter* | get_speed_scale() |
  861. +-----------+------------------------+
  862. Particle system's running speed scaling ratio. A value of ``0`` can be used to pause the particles.
  863. ----
  864. .. _class_CPUParticles_property_spread:
  865. - :ref:`float<class_float>` **spread**
  866. +-----------+-------------------+
  867. | *Default* | ``45.0`` |
  868. +-----------+-------------------+
  869. | *Setter* | set_spread(value) |
  870. +-----------+-------------------+
  871. | *Getter* | get_spread() |
  872. +-----------+-------------------+
  873. Each particle's initial direction range from ``+spread`` to ``-spread`` degrees. Applied to X/Z plane and Y/Z planes.
  874. ----
  875. .. _class_CPUParticles_property_tangential_accel:
  876. - :ref:`float<class_float>` **tangential_accel**
  877. +-----------+------------------+
  878. | *Default* | ``0.0`` |
  879. +-----------+------------------+
  880. | *Setter* | set_param(value) |
  881. +-----------+------------------+
  882. | *Getter* | get_param() |
  883. +-----------+------------------+
  884. Tangential acceleration applied to each particle. Tangential acceleration is perpendicular to the particle's velocity giving the particles a swirling motion.
  885. ----
  886. .. _class_CPUParticles_property_tangential_accel_curve:
  887. - :ref:`Curve<class_Curve>` **tangential_accel_curve**
  888. +----------+------------------------+
  889. | *Setter* | set_param_curve(value) |
  890. +----------+------------------------+
  891. | *Getter* | get_param_curve() |
  892. +----------+------------------------+
  893. Each particle's tangential acceleration will vary along this :ref:`Curve<class_Curve>`.
  894. ----
  895. .. _class_CPUParticles_property_tangential_accel_random:
  896. - :ref:`float<class_float>` **tangential_accel_random**
  897. +-----------+-----------------------------+
  898. | *Default* | ``0.0`` |
  899. +-----------+-----------------------------+
  900. | *Setter* | set_param_randomness(value) |
  901. +-----------+-----------------------------+
  902. | *Getter* | get_param_randomness() |
  903. +-----------+-----------------------------+
  904. Tangential acceleration randomness ratio.
  905. Method Descriptions
  906. -------------------
  907. .. _class_CPUParticles_method_convert_from_particles:
  908. - void **convert_from_particles** **(** :ref:`Node<class_Node>` particles **)**
  909. Sets this node's properties to match a given :ref:`Particles<class_Particles>` node with an assigned :ref:`ParticlesMaterial<class_ParticlesMaterial>`.
  910. ----
  911. .. _class_CPUParticles_method_get_param:
  912. - :ref:`float<class_float>` **get_param** **(** :ref:`Parameter<enum_CPUParticles_Parameter>` param **)** |const|
  913. Returns the base value of the parameter specified by :ref:`Parameter<enum_CPUParticles_Parameter>`.
  914. ----
  915. .. _class_CPUParticles_method_get_param_curve:
  916. - :ref:`Curve<class_Curve>` **get_param_curve** **(** :ref:`Parameter<enum_CPUParticles_Parameter>` param **)** |const|
  917. Returns the :ref:`Curve<class_Curve>` of the parameter specified by :ref:`Parameter<enum_CPUParticles_Parameter>`.
  918. ----
  919. .. _class_CPUParticles_method_get_param_randomness:
  920. - :ref:`float<class_float>` **get_param_randomness** **(** :ref:`Parameter<enum_CPUParticles_Parameter>` param **)** |const|
  921. Returns the randomness factor of the parameter specified by :ref:`Parameter<enum_CPUParticles_Parameter>`.
  922. ----
  923. .. _class_CPUParticles_method_get_particle_flag:
  924. - :ref:`bool<class_bool>` **get_particle_flag** **(** :ref:`Flags<enum_CPUParticles_Flags>` flag **)** |const|
  925. Returns the enabled state of the given flag (see :ref:`Flags<enum_CPUParticles_Flags>` for options).
  926. ----
  927. .. _class_CPUParticles_method_restart:
  928. - void **restart** **(** **)**
  929. Restarts the particle emitter.
  930. ----
  931. .. _class_CPUParticles_method_set_param:
  932. - void **set_param** **(** :ref:`Parameter<enum_CPUParticles_Parameter>` param, :ref:`float<class_float>` value **)**
  933. Sets the base value of the parameter specified by :ref:`Parameter<enum_CPUParticles_Parameter>`.
  934. ----
  935. .. _class_CPUParticles_method_set_param_curve:
  936. - void **set_param_curve** **(** :ref:`Parameter<enum_CPUParticles_Parameter>` param, :ref:`Curve<class_Curve>` curve **)**
  937. Sets the :ref:`Curve<class_Curve>` of the parameter specified by :ref:`Parameter<enum_CPUParticles_Parameter>`.
  938. ----
  939. .. _class_CPUParticles_method_set_param_randomness:
  940. - void **set_param_randomness** **(** :ref:`Parameter<enum_CPUParticles_Parameter>` param, :ref:`float<class_float>` randomness **)**
  941. Sets the randomness factor of the parameter specified by :ref:`Parameter<enum_CPUParticles_Parameter>`.
  942. ----
  943. .. _class_CPUParticles_method_set_particle_flag:
  944. - void **set_particle_flag** **(** :ref:`Flags<enum_CPUParticles_Flags>` flag, :ref:`bool<class_bool>` enable **)**
  945. Enables or disables the given flag (see :ref:`Flags<enum_CPUParticles_Flags>` for options).
  946. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
  947. .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
  948. .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`