class_gpuparticlesattractorvectorfield3d.rst 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  1. :github_url: hide
  2. .. DO NOT EDIT THIS FILE!!!
  3. .. Generated automatically from Godot engine sources.
  4. .. Generator: https://github.com/godotengine/godot/tree/master/doc/tools/make_rst.py.
  5. .. XML source: https://github.com/godotengine/godot/tree/master/doc/classes/GPUParticlesAttractorVectorField3D.xml.
  6. .. _class_GPUParticlesAttractorVectorField3D:
  7. GPUParticlesAttractorVectorField3D
  8. ==================================
  9. **Inherits:** :ref:`GPUParticlesAttractor3D<class_GPUParticlesAttractor3D>` **<** :ref:`VisualInstance3D<class_VisualInstance3D>` **<** :ref:`Node3D<class_Node3D>` **<** :ref:`Node<class_Node>` **<** :ref:`Object<class_Object>`
  10. A box-shaped attractor with varying directions and strengths defined in it that influences particles from :ref:`GPUParticles3D<class_GPUParticles3D>` nodes.
  11. .. rst-class:: classref-introduction-group
  12. Description
  13. -----------
  14. A box-shaped attractor with varying directions and strengths defined in it that influences particles from :ref:`GPUParticles3D<class_GPUParticles3D>` nodes.
  15. Unlike :ref:`GPUParticlesAttractorBox3D<class_GPUParticlesAttractorBox3D>`, **GPUParticlesAttractorVectorField3D** uses a :ref:`texture<class_GPUParticlesAttractorVectorField3D_property_texture>` to affect attraction strength within the box. This can be used to create complex attraction scenarios where particles travel in different directions depending on their location. This can be useful for weather effects such as sandstorms.
  16. Particle attractors work in real-time and can be moved, rotated and scaled during gameplay. Unlike collision shapes, non-uniform scaling of attractors is also supported.
  17. \ **Note:** Particle attractors only affect :ref:`GPUParticles3D<class_GPUParticles3D>`, not :ref:`CPUParticles3D<class_CPUParticles3D>`.
  18. .. rst-class:: classref-reftable-group
  19. Properties
  20. ----------
  21. .. table::
  22. :widths: auto
  23. +-----------------------------------+---------------------------------------------------------------------------+----------------------+
  24. | :ref:`Vector3<class_Vector3>` | :ref:`size<class_GPUParticlesAttractorVectorField3D_property_size>` | ``Vector3(2, 2, 2)`` |
  25. +-----------------------------------+---------------------------------------------------------------------------+----------------------+
  26. | :ref:`Texture3D<class_Texture3D>` | :ref:`texture<class_GPUParticlesAttractorVectorField3D_property_texture>` | |
  27. +-----------------------------------+---------------------------------------------------------------------------+----------------------+
  28. .. rst-class:: classref-section-separator
  29. ----
  30. .. rst-class:: classref-descriptions-group
  31. Property Descriptions
  32. ---------------------
  33. .. _class_GPUParticlesAttractorVectorField3D_property_size:
  34. .. rst-class:: classref-property
  35. :ref:`Vector3<class_Vector3>` **size** = ``Vector3(2, 2, 2)`` :ref:`🔗<class_GPUParticlesAttractorVectorField3D_property_size>`
  36. .. rst-class:: classref-property-setget
  37. - |void| **set_size**\ (\ value\: :ref:`Vector3<class_Vector3>`\ )
  38. - :ref:`Vector3<class_Vector3>` **get_size**\ (\ )
  39. The size of the vector field box in 3D units.
  40. .. rst-class:: classref-item-separator
  41. ----
  42. .. _class_GPUParticlesAttractorVectorField3D_property_texture:
  43. .. rst-class:: classref-property
  44. :ref:`Texture3D<class_Texture3D>` **texture** :ref:`🔗<class_GPUParticlesAttractorVectorField3D_property_texture>`
  45. .. rst-class:: classref-property-setget
  46. - |void| **set_texture**\ (\ value\: :ref:`Texture3D<class_Texture3D>`\ )
  47. - :ref:`Texture3D<class_Texture3D>` **get_texture**\ (\ )
  48. The 3D texture to be used. Values are linearly interpolated between the texture's pixels.
  49. \ **Note:** To get better performance, the 3D texture's resolution should reflect the :ref:`size<class_GPUParticlesAttractorVectorField3D_property_size>` of the attractor. Since particle attraction is usually low-frequency data, the texture can be kept at a low resolution such as 64×64×64.
  50. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
  51. .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
  52. .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
  53. .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
  54. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
  55. .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`
  56. .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)`
  57. .. |void| replace:: :abbr:`void (No return value.)`