Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion classes/class_animation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -877,7 +877,7 @@ Compress the animation and all its tracks in-place. This will make :ref:`track_i

void **copy_track** **(** :ref:`int<class_int>` track_idx, :ref:`Animation<class_Animation>` to_animation **)**

Adds a new track that is a copy of the given track from ``to_animation``.
Adds a new track to ``to_animation`` that is a copy of the given track from this animation.

.. rst-class:: classref-item-separator

Expand Down
2 changes: 1 addition & 1 deletion classes/class_basematerial3d.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1227,7 +1227,7 @@ The object's X axis will always face the camera.

:ref:`BillboardMode<enum_BaseMaterial3D_BillboardMode>` **BILLBOARD_PARTICLES** = ``3``

Used for particle systems when assigned to :ref:`GPUParticles3D<class_GPUParticles3D>` and :ref:`CPUParticles3D<class_CPUParticles3D>` nodes. Enables ``particles_anim_*`` properties.
Used for particle systems when assigned to :ref:`GPUParticles3D<class_GPUParticles3D>` and :ref:`CPUParticles3D<class_CPUParticles3D>` nodes (flipbook animation). Enables ``particles_anim_*`` properties.

The :ref:`ParticleProcessMaterial.anim_speed_min<class_ParticleProcessMaterial_property_anim_speed_min>` or :ref:`CPUParticles3D.anim_speed_min<class_CPUParticles3D_property_anim_speed_min>` should also be set to a value bigger than zero for the animation to play.

Expand Down
8 changes: 6 additions & 2 deletions classes/class_control.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1131,15 +1131,19 @@ Sent when the node needs to refresh its theme items. This happens in one of the

**NOTIFICATION_SCROLL_BEGIN** = ``47``

Sent when this node is inside a :ref:`ScrollContainer<class_ScrollContainer>` which has begun being scrolled.
Sent when this node is inside a :ref:`ScrollContainer<class_ScrollContainer>` which has begun being scrolled when dragging the scrollable area *with a touch event*. This notification is *not* sent when scrolling by dragging the scrollbar, scrolling with the mouse wheel or scrolling with keyboard/gamepad events.

\ **Note:** This signal is only emitted on Android or iOS, or on desktop/web platforms when :ref:`ProjectSettings.input_devices/pointing/emulate_touch_from_mouse<class_ProjectSettings_property_input_devices/pointing/emulate_touch_from_mouse>` is enabled.

.. _class_Control_constant_NOTIFICATION_SCROLL_END:

.. rst-class:: classref-constant

**NOTIFICATION_SCROLL_END** = ``48``

Sent when this node is inside a :ref:`ScrollContainer<class_ScrollContainer>` which has stopped being scrolled.
Sent when this node is inside a :ref:`ScrollContainer<class_ScrollContainer>` which has stopped being scrolled when dragging the scrollable area *with a touch event*. This notification is *not* sent when scrolling by dragging the scrollbar, scrolling with the mouse wheel or scrolling with keyboard/gamepad events.

\ **Note:** This signal is only emitted on Android or iOS, or on desktop/web platforms when :ref:`ProjectSettings.input_devices/pointing/emulate_touch_from_mouse<class_ProjectSettings_property_input_devices/pointing/emulate_touch_from_mouse>` is enabled.

.. _class_Control_constant_NOTIFICATION_LAYOUT_DIRECTION_CHANGED:

Expand Down
20 changes: 14 additions & 6 deletions classes/class_gpuparticles2d.rst
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,9 @@ Property Descriptions
- void **set_amount** **(** :ref:`int<class_int>` value **)**
- :ref:`int<class_int>` **get_amount** **(** **)**

Number of particles emitted in one emission cycle.
The number of particles to emit in one emission cycle. The effective emission rate is ``(amount * amount_ratio) / lifetime`` particles per second. Higher values will increase GPU requirements, even if not all particles are visible at a given time or if :ref:`amount_ratio<class_GPUParticles2D_property_amount_ratio>` is decreased.

\ **Note:** Changing this value will cause the particle system to restart. To avoid this, change :ref:`amount_ratio<class_GPUParticles2D_property_amount_ratio>` instead.

.. rst-class:: classref-item-separator

Expand All @@ -259,7 +261,7 @@ Number of particles emitted in one emission cycle.

The ratio of particles that should actually be emitted. If set to a value lower than ``1.0``, this will set the amount of emitted particles throughout the lifetime to ``amount * amount_ratio``. Unlike changing :ref:`amount<class_GPUParticles2D_property_amount>`, changing :ref:`amount_ratio<class_GPUParticles2D_property_amount_ratio>` while emitting does not affect already-emitted particles and doesn't cause the particle system to restart. :ref:`amount_ratio<class_GPUParticles2D_property_amount_ratio>` can be used to create effects that make the number of emitted particles vary over time.

\ **Note:** Reducing the :ref:`amount_ratio<class_GPUParticles2D_property_amount_ratio>` has no performance benefit, since resources need to be allocated and processed for the total :ref:`amount<class_GPUParticles2D_property_amount>` of particles regardless of the :ref:`amount_ratio<class_GPUParticles2D_property_amount_ratio>`.
\ **Note:** Reducing the :ref:`amount_ratio<class_GPUParticles2D_property_amount_ratio>` has no performance benefit, since resources need to be allocated and processed for the total :ref:`amount<class_GPUParticles2D_property_amount>` of particles regardless of the :ref:`amount_ratio<class_GPUParticles2D_property_amount_ratio>`. If you don't intend to change the number of particles emitted while the particles are emitting, make sure :ref:`amount_ratio<class_GPUParticles2D_property_amount_ratio>` is set to ``1`` and change :ref:`amount<class_GPUParticles2D_property_amount>` to your liking instead.

.. rst-class:: classref-item-separator

Expand All @@ -276,7 +278,9 @@ The ratio of particles that should actually be emitted. If set to a value lower
- void **set_collision_base_size** **(** :ref:`float<class_float>` value **)**
- :ref:`float<class_float>` **get_collision_base_size** **(** **)**

Multiplier for particle's collision radius. ``1.0`` corresponds to the size of the sprite.
Multiplier for particle's collision radius. ``1.0`` corresponds to the size of the sprite. If particles appear to sink into the ground when colliding, increase this value. If particles appear to float when colliding, decrease this value. Only effective if :ref:`ParticleProcessMaterial.collision_mode<class_ParticleProcessMaterial_property_collision_mode>` is :ref:`ParticleProcessMaterial.COLLISION_RIGID<class_ParticleProcessMaterial_constant_COLLISION_RIGID>` or :ref:`ParticleProcessMaterial.COLLISION_HIDE_ON_CONTACT<class_ParticleProcessMaterial_constant_COLLISION_HIDE_ON_CONTACT>`.

\ **Note:** Particles always have a spherical collision shape.

.. rst-class:: classref-item-separator

Expand Down Expand Up @@ -414,7 +418,7 @@ Enables particle interpolation, which makes the particle movement smoother when
- void **set_lifetime** **(** :ref:`float<class_float>` value **)**
- :ref:`float<class_float>` **get_lifetime** **(** **)**

Amount of time each particle will exist.
The amount of time each particle will exist (in seconds). The effective emission rate is ``(amount * amount_ratio) / lifetime`` particles per second.

.. rst-class:: classref-item-separator

Expand Down Expand Up @@ -533,7 +537,9 @@ Particle system's running speed scaling ratio. A value of ``0`` can be used to p
- void **set_sub_emitter** **(** :ref:`NodePath<class_NodePath>` value **)**
- :ref:`NodePath<class_NodePath>` **get_sub_emitter** **(** **)**

The :ref:`NodePath<class_NodePath>` to the **GPUParticles2D** used for sub-emissions.
Path to another **GPUParticles2D** node that will be used as a subemitter (see :ref:`ParticleProcessMaterial.sub_emitter_mode<class_ParticleProcessMaterial_property_sub_emitter_mode>`). Subemitters can be used to achieve effects such as fireworks, sparks on collision, bubbles popping into water drops, and more.

\ **Note:** When :ref:`sub_emitter<class_GPUParticles2D_property_sub_emitter>` is set, the target **GPUParticles2D** node will no longer emit particles on its own.

.. rst-class:: classref-item-separator

Expand All @@ -550,7 +556,9 @@ The :ref:`NodePath<class_NodePath>` to the **GPUParticles2D** used for sub-emiss
- void **set_texture** **(** :ref:`Texture2D<class_Texture2D>` value **)**
- :ref:`Texture2D<class_Texture2D>` **get_texture** **(** **)**

Particle texture. If ``null``, particles will be squares.
Particle texture. If ``null``, particles will be squares with a size of 1×1 pixels.

\ **Note:** To use a flipbook texture, assign a new :ref:`CanvasItemMaterial<class_CanvasItemMaterial>` to the **GPUParticles2D**'s :ref:`CanvasItem.material<class_CanvasItem_property_material>` property, then enable :ref:`CanvasItemMaterial.particles_animation<class_CanvasItemMaterial_property_particles_animation>` and set :ref:`CanvasItemMaterial.particles_anim_h_frames<class_CanvasItemMaterial_property_particles_anim_h_frames>`, :ref:`CanvasItemMaterial.particles_anim_v_frames<class_CanvasItemMaterial_property_particles_anim_v_frames>`, and :ref:`CanvasItemMaterial.particles_anim_loop<class_CanvasItemMaterial_property_particles_anim_loop>` to match the flipbook texture.

.. rst-class:: classref-item-separator

Expand Down
20 changes: 12 additions & 8 deletions classes/class_gpuparticles3d.rst
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,9 @@ Property Descriptions
- void **set_amount** **(** :ref:`int<class_int>` value **)**
- :ref:`int<class_int>` **get_amount** **(** **)**

Number of particles to emit.
The number of particles to emit in one emission cycle. The effective emission rate is ``(amount * amount_ratio) / lifetime`` particles per second. Higher values will increase GPU requirements, even if not all particles are visible at a given time or if :ref:`amount_ratio<class_GPUParticles3D_property_amount_ratio>` is decreased.

\ **Note:** Changing this value will cause the particle system to restart. To avoid this, change :ref:`amount_ratio<class_GPUParticles3D_property_amount_ratio>` instead.

.. rst-class:: classref-item-separator

Expand All @@ -336,7 +338,7 @@ Number of particles to emit.

The ratio of particles that should actually be emitted. If set to a value lower than ``1.0``, this will set the amount of emitted particles throughout the lifetime to ``amount * amount_ratio``. Unlike changing :ref:`amount<class_GPUParticles3D_property_amount>`, changing :ref:`amount_ratio<class_GPUParticles3D_property_amount_ratio>` while emitting does not affect already-emitted particles and doesn't cause the particle system to restart. :ref:`amount_ratio<class_GPUParticles3D_property_amount_ratio>` can be used to create effects that make the number of emitted particles vary over time.

\ **Note:** Reducing the :ref:`amount_ratio<class_GPUParticles3D_property_amount_ratio>` has no performance benefit, since resources need to be allocated and processed for the total :ref:`amount<class_GPUParticles3D_property_amount>` of particles regardless of the :ref:`amount_ratio<class_GPUParticles3D_property_amount_ratio>`.
\ **Note:** Reducing the :ref:`amount_ratio<class_GPUParticles3D_property_amount_ratio>` has no performance benefit, since resources need to be allocated and processed for the total :ref:`amount<class_GPUParticles3D_property_amount>` of particles regardless of the :ref:`amount_ratio<class_GPUParticles3D_property_amount_ratio>`. If you don't intend to change the number of particles emitted while the particles are emitting, make sure :ref:`amount_ratio<class_GPUParticles3D_property_amount_ratio>` is set to ``1`` and change :ref:`amount<class_GPUParticles3D_property_amount>` to your liking instead.

.. rst-class:: classref-item-separator

Expand All @@ -353,9 +355,9 @@ The ratio of particles that should actually be emitted. If set to a value lower
- void **set_collision_base_size** **(** :ref:`float<class_float>` value **)**
- :ref:`float<class_float>` **get_collision_base_size** **(** **)**

.. container:: contribute
The base diameter for particle collision in meters. If particles appear to sink into the ground when colliding, increase this value. If particles appear to float when colliding, decrease this value. Only effective if :ref:`ParticleProcessMaterial.collision_mode<class_ParticleProcessMaterial_property_collision_mode>` is :ref:`ParticleProcessMaterial.COLLISION_RIGID<class_ParticleProcessMaterial_constant_COLLISION_RIGID>` or :ref:`ParticleProcessMaterial.COLLISION_HIDE_ON_CONTACT<class_ParticleProcessMaterial_constant_COLLISION_HIDE_ON_CONTACT>`.

There is currently no description for this property. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`!
\ **Note:** Particles always have a spherical collision shape.

.. rst-class:: classref-item-separator

Expand Down Expand Up @@ -599,7 +601,7 @@ Enables particle interpolation, which makes the particle movement smoother when
- void **set_lifetime** **(** :ref:`float<class_float>` value **)**
- :ref:`float<class_float>` **get_lifetime** **(** **)**

Amount of time each particle will exist.
The amount of time each particle will exist (in seconds). The effective emission rate is ``(amount * amount_ratio) / lifetime`` particles per second.

.. rst-class:: classref-item-separator

Expand Down Expand Up @@ -718,9 +720,9 @@ Speed scaling ratio. A value of ``0`` can be used to pause the particles.
- void **set_sub_emitter** **(** :ref:`NodePath<class_NodePath>` value **)**
- :ref:`NodePath<class_NodePath>` **get_sub_emitter** **(** **)**

.. container:: contribute
Path to another **GPUParticles3D** node that will be used as a subemitter (see :ref:`ParticleProcessMaterial.sub_emitter_mode<class_ParticleProcessMaterial_property_sub_emitter_mode>`). Subemitters can be used to achieve effects such as fireworks, sparks on collision, bubbles popping into water drops, and more.

There is currently no description for this property. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`!
\ **Note:** When :ref:`sub_emitter<class_GPUParticles3D_property_sub_emitter>` is set, the target **GPUParticles3D** node will no longer emit particles on its own.

.. rst-class:: classref-item-separator

Expand Down Expand Up @@ -794,10 +796,12 @@ The amount of time the particle's trail should represent (in seconds). Only effe
- void **set_visibility_aabb** **(** :ref:`AABB<class_AABB>` value **)**
- :ref:`AABB<class_AABB>` **get_visibility_aabb** **(** **)**

The :ref:`AABB<class_AABB>` that determines the node's region which needs to be visible on screen for the particle system to be active.
The :ref:`AABB<class_AABB>` that determines the node's region which needs to be visible on screen for the particle system to be active. :ref:`GeometryInstance3D.extra_cull_margin<class_GeometryInstance3D_property_extra_cull_margin>` is added on each of the AABB's axes. Particle collisions and attraction will only occur within this area.

Grow the box if particles suddenly appear/disappear when the node enters/exits the screen. The :ref:`AABB<class_AABB>` can be grown via code or with the **Particles → Generate AABB** editor tool.

\ **Note:** :ref:`visibility_aabb<class_GPUParticles3D_property_visibility_aabb>` is overridden by :ref:`GeometryInstance3D.custom_aabb<class_GeometryInstance3D_property_custom_aabb>` if that property is set to a non-default value.

.. rst-class:: classref-section-separator

----
Expand Down
9 changes: 9 additions & 0 deletions classes/class_immediatemesh.rst
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,15 @@ Here's a sample on how to generate a triangular face:
mesh.surface_add_vertex(Vector3.ZERO)
mesh.surface_end()

.. code-tab:: csharp

var mesh = new ImmediateMesh();
mesh.SurfaceBegin(Mesh.PrimitiveType.Triangles);
mesh.SurfaceAddVertex(Vector3.Left);
mesh.SurfaceAddVertex(Vector3.Forward);
mesh.SurfaceAddVertex(Vector3.Zero);
mesh.SurfaceEnd();



\ **Note:** Generating complex geometries with **ImmediateMesh** is highly inefficient. Instead, it is designed to generate simple geometry that changes often.
Expand Down
4 changes: 3 additions & 1 deletion classes/class_light3d.rst
Original file line number Diff line number Diff line change
Expand Up @@ -331,6 +331,8 @@ Light is ignored when baking. This is the fastest mode, but the light will be ta

Light is taken into account in static baking (:ref:`VoxelGI<class_VoxelGI>`, :ref:`LightmapGI<class_LightmapGI>`, SDFGI (:ref:`Environment.sdfgi_enabled<class_Environment_property_sdfgi_enabled>`)). The light can be moved around or modified, but its global illumination will not update in real-time. This is suitable for subtle changes (such as flickering torches), but generally not large changes such as toggling a light on and off.

\ **Note:** The light is not baked in :ref:`LightmapGI<class_LightmapGI>` if :ref:`editor_only<class_Light3D_property_editor_only>` is ``true``.

.. _class_Light3D_constant_BAKE_DYNAMIC:

.. rst-class:: classref-enumeration-constant
Expand Down Expand Up @@ -435,7 +437,7 @@ The distance from the camera at which the light's shadow cuts off (in 3D units).
- void **set_editor_only** **(** :ref:`bool<class_bool>` value **)**
- :ref:`bool<class_bool>` **is_editor_only** **(** **)**

If ``true``, the light only appears in the editor and will not be visible at runtime.
If ``true``, the light only appears in the editor and will not be visible at runtime. If ``true``, the light will never be baked in :ref:`LightmapGI<class_LightmapGI>` regardless of its :ref:`light_bake_mode<class_Light3D_property_light_bake_mode>`.

.. rst-class:: classref-item-separator

Expand Down
2 changes: 1 addition & 1 deletion classes/class_lightmapgi.rst
Original file line number Diff line number Diff line change
Expand Up @@ -420,7 +420,7 @@ The strength of denoising step applied to the generated lightmaps. Only effectiv
- void **set_directional** **(** :ref:`bool<class_bool>` value **)**
- :ref:`bool<class_bool>` **is_directional** **(** **)**

If ``true``, bakes lightmaps to contain directional information as spherical harmonics. This results in more realistic lighting appearance, especially with normal mapped materials and for lights that have their direct light baked (:ref:`Light3D.light_bake_mode<class_Light3D_property_light_bake_mode>` set to :ref:`Light3D.BAKE_STATIC<class_Light3D_constant_BAKE_STATIC>`). The directional information is also used to provide rough reflections for static and dynamic objects. This has a small run-time performance cost as the shader has to perform more work to interpret the direction information from the lightmap. Directional lightmaps also take longer to bake and result in larger file sizes.
If ``true``, bakes lightmaps to contain directional information as spherical harmonics. This results in more realistic lighting appearance, especially with normal mapped materials and for lights that have their direct light baked (:ref:`Light3D.light_bake_mode<class_Light3D_property_light_bake_mode>` set to :ref:`Light3D.BAKE_STATIC<class_Light3D_constant_BAKE_STATIC>` and with :ref:`Light3D.editor_only<class_Light3D_property_editor_only>` set to ``false``). The directional information is also used to provide rough reflections for static and dynamic objects. This has a small run-time performance cost as the shader has to perform more work to interpret the direction information from the lightmap. Directional lightmaps also take longer to bake and result in larger file sizes.

\ **Note:** The property's name has no relationship with :ref:`DirectionalLight3D<class_DirectionalLight3D>`. :ref:`directional<class_LightmapGI_property_directional>` works with all light types.

Expand Down
Loading