summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--doc/classes/Callable.xml14
-rw-r--r--doc/classes/GPUParticles3D.xml2
-rw-r--r--doc/classes/GPUParticlesAttractor3D.xml23
-rw-r--r--doc/classes/GPUParticlesAttractorBox.xml17
-rw-r--r--doc/classes/GPUParticlesAttractorSphere.xml17
-rw-r--r--doc/classes/GPUParticlesAttractorVectorField.xml19
-rw-r--r--doc/classes/GPUParticlesCollision3D.xml17
-rw-r--r--doc/classes/GPUParticlesCollisionBox.xml17
-rw-r--r--doc/classes/GPUParticlesCollisionHeightField.xml43
-rw-r--r--doc/classes/GPUParticlesCollisionSDF.xml37
-rw-r--r--doc/classes/GPUParticlesCollisionSphere.xml17
-rw-r--r--doc/classes/ParticlesMaterial.xml10
-rw-r--r--doc/classes/RenderingServer.xml14
-rw-r--r--scene/3d/gpu_particles_collision_3d.cpp4
-rw-r--r--servers/rendering_server.cpp1
15 files changed, 246 insertions, 6 deletions
diff --git a/doc/classes/Callable.xml b/doc/classes/Callable.xml
index 3bbee993ac..ad5c549fee 100644
--- a/doc/classes/Callable.xml
+++ b/doc/classes/Callable.xml
@@ -47,6 +47,12 @@
Creates a new [Callable] for the method called [code]method_name[/code] in the specified [code]object[/code].
</description>
</method>
+ <method name="bind" qualifiers="vararg">
+ <return type="void">
+ </return>
+ <description>
+ </description>
+ </method>
<method name="call" qualifiers="vararg">
<return type="Variant">
</return>
@@ -106,6 +112,14 @@
<description>
</description>
</method>
+ <method name="unbind">
+ <return type="Callable">
+ </return>
+ <argument index="0" name="argcount" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
</methods>
<constants>
</constants>
diff --git a/doc/classes/GPUParticles3D.xml b/doc/classes/GPUParticles3D.xml
index e840e457bf..d1296c3418 100644
--- a/doc/classes/GPUParticles3D.xml
+++ b/doc/classes/GPUParticles3D.xml
@@ -67,6 +67,8 @@
<member name="amount" type="int" setter="set_amount" getter="get_amount" default="8">
Number of particles to emit.
</member>
+ <member name="collision_base_size" type="float" setter="set_collision_base_size" getter="get_collision_base_size" default="0.01">
+ </member>
<member name="draw_order" type="int" setter="set_draw_order" getter="get_draw_order" enum="GPUParticles3D.DrawOrder" default="0">
Particle draw order. Uses [enum DrawOrder] values.
</member>
diff --git a/doc/classes/GPUParticlesAttractor3D.xml b/doc/classes/GPUParticlesAttractor3D.xml
new file mode 100644
index 0000000000..111827d294
--- /dev/null
+++ b/doc/classes/GPUParticlesAttractor3D.xml
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="GPUParticlesAttractor3D" inherits="VisualInstance3D" version="4.0">
+ <brief_description>
+ </brief_description>
+ <description>
+ </description>
+ <tutorials>
+ </tutorials>
+ <methods>
+ </methods>
+ <members>
+ <member name="attenuation" type="float" setter="set_attenuation" getter="get_attenuation" default="1.0">
+ </member>
+ <member name="cull_mask" type="int" setter="set_cull_mask" getter="get_cull_mask" default="4294967295">
+ </member>
+ <member name="directionality" type="float" setter="set_directionality" getter="get_directionality" default="0.0">
+ </member>
+ <member name="strength" type="float" setter="set_strength" getter="get_strength" default="1.0">
+ </member>
+ </members>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/GPUParticlesAttractorBox.xml b/doc/classes/GPUParticlesAttractorBox.xml
new file mode 100644
index 0000000000..68616f9bbd
--- /dev/null
+++ b/doc/classes/GPUParticlesAttractorBox.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="GPUParticlesAttractorBox" inherits="GPUParticlesAttractor3D" version="4.0">
+ <brief_description>
+ </brief_description>
+ <description>
+ </description>
+ <tutorials>
+ </tutorials>
+ <methods>
+ </methods>
+ <members>
+ <member name="extents" type="Vector3" setter="set_extents" getter="get_extents" default="Vector3( 1, 1, 1 )">
+ </member>
+ </members>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/GPUParticlesAttractorSphere.xml b/doc/classes/GPUParticlesAttractorSphere.xml
new file mode 100644
index 0000000000..6984427a96
--- /dev/null
+++ b/doc/classes/GPUParticlesAttractorSphere.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="GPUParticlesAttractorSphere" inherits="GPUParticlesAttractor3D" version="4.0">
+ <brief_description>
+ </brief_description>
+ <description>
+ </description>
+ <tutorials>
+ </tutorials>
+ <methods>
+ </methods>
+ <members>
+ <member name="radius" type="float" setter="set_radius" getter="get_radius" default="1.0">
+ </member>
+ </members>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/GPUParticlesAttractorVectorField.xml b/doc/classes/GPUParticlesAttractorVectorField.xml
new file mode 100644
index 0000000000..cf5e375ea3
--- /dev/null
+++ b/doc/classes/GPUParticlesAttractorVectorField.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="GPUParticlesAttractorVectorField" inherits="GPUParticlesAttractor3D" version="4.0">
+ <brief_description>
+ </brief_description>
+ <description>
+ </description>
+ <tutorials>
+ </tutorials>
+ <methods>
+ </methods>
+ <members>
+ <member name="extents" type="Vector3" setter="set_extents" getter="get_extents" default="Vector3( 1, 1, 1 )">
+ </member>
+ <member name="texture" type="Texture3D" setter="set_texture" getter="get_texture">
+ </member>
+ </members>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/GPUParticlesCollision3D.xml b/doc/classes/GPUParticlesCollision3D.xml
new file mode 100644
index 0000000000..dce9a32fc4
--- /dev/null
+++ b/doc/classes/GPUParticlesCollision3D.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="GPUParticlesCollision3D" inherits="VisualInstance3D" version="4.0">
+ <brief_description>
+ </brief_description>
+ <description>
+ </description>
+ <tutorials>
+ </tutorials>
+ <methods>
+ </methods>
+ <members>
+ <member name="cull_mask" type="int" setter="set_cull_mask" getter="get_cull_mask" default="4294967295">
+ </member>
+ </members>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/GPUParticlesCollisionBox.xml b/doc/classes/GPUParticlesCollisionBox.xml
new file mode 100644
index 0000000000..17fc124c41
--- /dev/null
+++ b/doc/classes/GPUParticlesCollisionBox.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="GPUParticlesCollisionBox" inherits="GPUParticlesCollision3D" version="4.0">
+ <brief_description>
+ </brief_description>
+ <description>
+ </description>
+ <tutorials>
+ </tutorials>
+ <methods>
+ </methods>
+ <members>
+ <member name="extents" type="Vector3" setter="set_extents" getter="get_extents" default="Vector3( 1, 1, 1 )">
+ </member>
+ </members>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/GPUParticlesCollisionHeightField.xml b/doc/classes/GPUParticlesCollisionHeightField.xml
new file mode 100644
index 0000000000..c6987515a9
--- /dev/null
+++ b/doc/classes/GPUParticlesCollisionHeightField.xml
@@ -0,0 +1,43 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="GPUParticlesCollisionHeightField" inherits="GPUParticlesCollision3D" version="4.0">
+ <brief_description>
+ </brief_description>
+ <description>
+ </description>
+ <tutorials>
+ </tutorials>
+ <methods>
+ </methods>
+ <members>
+ <member name="extents" type="Vector3" setter="set_extents" getter="get_extents" default="Vector3( 1, 1, 1 )">
+ </member>
+ <member name="follow_camera_enabled" type="bool" setter="set_follow_camera_mode" getter="is_follow_camera_mode_enabled" default="false">
+ </member>
+ <member name="follow_camera_push_ratio" type="float" setter="set_follow_camera_push_ratio" getter="get_follow_camera_push_ratio" default="0.1">
+ </member>
+ <member name="resolution" type="int" setter="set_resolution" getter="get_resolution" enum="GPUParticlesCollisionHeightField.Resolution" default="2">
+ </member>
+ <member name="update_mode" type="int" setter="set_update_mode" getter="get_update_mode" enum="GPUParticlesCollisionHeightField.UpdateMode" default="0">
+ </member>
+ </members>
+ <constants>
+ <constant name="RESOLUTION_256" value="0" enum="Resolution">
+ </constant>
+ <constant name="RESOLUTION_512" value="1" enum="Resolution">
+ </constant>
+ <constant name="RESOLUTION_1024" value="2" enum="Resolution">
+ </constant>
+ <constant name="RESOLUTION_2048" value="3" enum="Resolution">
+ </constant>
+ <constant name="RESOLUTION_4096" value="4" enum="Resolution">
+ </constant>
+ <constant name="RESOLUTION_8192" value="5" enum="Resolution">
+ </constant>
+ <constant name="RESOLUTION_MAX" value="6" enum="Resolution">
+ </constant>
+ <constant name="UPDATE_MODE_WHEN_MOVED" value="0" enum="UpdateMode">
+ </constant>
+ <constant name="UPDATE_MODE_ALWAYS" value="1" enum="UpdateMode">
+ </constant>
+ </constants>
+</class>
diff --git a/doc/classes/GPUParticlesCollisionSDF.xml b/doc/classes/GPUParticlesCollisionSDF.xml
new file mode 100644
index 0000000000..c3cbe4b1c6
--- /dev/null
+++ b/doc/classes/GPUParticlesCollisionSDF.xml
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="GPUParticlesCollisionSDF" inherits="GPUParticlesCollision3D" version="4.0">
+ <brief_description>
+ </brief_description>
+ <description>
+ </description>
+ <tutorials>
+ </tutorials>
+ <methods>
+ </methods>
+ <members>
+ <member name="extents" type="Vector3" setter="set_extents" getter="get_extents" default="Vector3( 1, 1, 1 )">
+ </member>
+ <member name="resolution" type="int" setter="set_resolution" getter="get_resolution" enum="GPUParticlesCollisionSDF.Resolution" default="2">
+ </member>
+ <member name="texture" type="Texture3D" setter="set_texture" getter="get_texture">
+ </member>
+ <member name="thickness" type="float" setter="set_thickness" getter="get_thickness" default="1.0">
+ </member>
+ </members>
+ <constants>
+ <constant name="RESOLUTION_16" value="0" enum="Resolution">
+ </constant>
+ <constant name="RESOLUTION_32" value="1" enum="Resolution">
+ </constant>
+ <constant name="RESOLUTION_64" value="2" enum="Resolution">
+ </constant>
+ <constant name="RESOLUTION_128" value="3" enum="Resolution">
+ </constant>
+ <constant name="RESOLUTION_256" value="4" enum="Resolution">
+ </constant>
+ <constant name="RESOLUTION_512" value="5" enum="Resolution">
+ </constant>
+ <constant name="RESOLUTION_MAX" value="6" enum="Resolution">
+ </constant>
+ </constants>
+</class>
diff --git a/doc/classes/GPUParticlesCollisionSphere.xml b/doc/classes/GPUParticlesCollisionSphere.xml
new file mode 100644
index 0000000000..41150960d2
--- /dev/null
+++ b/doc/classes/GPUParticlesCollisionSphere.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="GPUParticlesCollisionSphere" inherits="GPUParticlesCollision3D" version="4.0">
+ <brief_description>
+ </brief_description>
+ <description>
+ </description>
+ <tutorials>
+ </tutorials>
+ <methods>
+ </methods>
+ <members>
+ <member name="radius" type="float" setter="set_radius" getter="get_radius" default="1.0">
+ </member>
+ </members>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/ParticlesMaterial.xml b/doc/classes/ParticlesMaterial.xml
index f6fa3cf38b..77df6245e9 100644
--- a/doc/classes/ParticlesMaterial.xml
+++ b/doc/classes/ParticlesMaterial.xml
@@ -131,6 +131,16 @@
<member name="anim_speed_random" type="float" setter="set_param_randomness" getter="get_param_randomness" default="0.0">
Animation speed randomness ratio.
</member>
+ <member name="attractor_interaction_enabled" type="bool" setter="set_attractor_interaction_enabled" getter="is_attractor_interaction_enabled" default="true">
+ </member>
+ <member name="collision_bounce" type="float" setter="set_collision_bounce" getter="get_collision_bounce" default="0.0">
+ </member>
+ <member name="collision_enabled" type="bool" setter="set_collision_enabled" getter="is_collision_enabled" default="true">
+ </member>
+ <member name="collision_friction" type="float" setter="set_collision_friction" getter="get_collision_friction" default="0.0">
+ </member>
+ <member name="collision_use_scale" type="bool" setter="set_collision_use_scale" getter="is_collision_using_scale" default="false">
+ </member>
<member name="color" type="Color" setter="set_color" getter="get_color" default="Color( 1, 1, 1, 1 )">
Each particle's initial color. If the [GPUParticles2D]'s [code]texture[/code] is defined, it will be multiplied by this color. To have particle display color in a [BaseMaterial3D] make sure to set [member BaseMaterial3D.vertex_color_use_as_albedo] to [code]true[/code].
</member>
diff --git a/doc/classes/RenderingServer.xml b/doc/classes/RenderingServer.xml
index 9ca699501f..456022a626 100644
--- a/doc/classes/RenderingServer.xml
+++ b/doc/classes/RenderingServer.xml
@@ -3579,22 +3579,24 @@
<constant name="INSTANCE_PARTICLES" value="4" enum="InstanceType">
The instance is a particle emitter.
</constant>
- <constant name="INSTANCE_LIGHT" value="5" enum="InstanceType">
+ <constant name="INSTANCE_PARTICLES_COLLISION" value="5" enum="InstanceType">
+ </constant>
+ <constant name="INSTANCE_LIGHT" value="6" enum="InstanceType">
The instance is a light.
</constant>
- <constant name="INSTANCE_REFLECTION_PROBE" value="6" enum="InstanceType">
+ <constant name="INSTANCE_REFLECTION_PROBE" value="7" enum="InstanceType">
The instance is a reflection probe.
</constant>
- <constant name="INSTANCE_DECAL" value="7" enum="InstanceType">
+ <constant name="INSTANCE_DECAL" value="8" enum="InstanceType">
The instance is a decal.
</constant>
- <constant name="INSTANCE_GI_PROBE" value="8" enum="InstanceType">
+ <constant name="INSTANCE_GI_PROBE" value="9" enum="InstanceType">
The instance is a GI probe.
</constant>
- <constant name="INSTANCE_LIGHTMAP" value="9" enum="InstanceType">
+ <constant name="INSTANCE_LIGHTMAP" value="10" enum="InstanceType">
The instance is a lightmap.
</constant>
- <constant name="INSTANCE_MAX" value="10" enum="InstanceType">
+ <constant name="INSTANCE_MAX" value="11" enum="InstanceType">
Represents the size of the [enum InstanceType] enum.
</constant>
<constant name="INSTANCE_GEOMETRY_MASK" value="30" enum="InstanceType">
diff --git a/scene/3d/gpu_particles_collision_3d.cpp b/scene/3d/gpu_particles_collision_3d.cpp
index af737b058c..baaaa23185 100644
--- a/scene/3d/gpu_particles_collision_3d.cpp
+++ b/scene/3d/gpu_particles_collision_3d.cpp
@@ -29,6 +29,7 @@
/*************************************************************************/
#include "gpu_particles_collision_3d.h"
+
#include "core/thread_work_pool.h"
#include "mesh_instance_3d.h"
#include "scene/3d/camera_3d.h"
@@ -663,6 +664,9 @@ void GPUParticlesCollisionHeightField::_bind_methods() {
BIND_ENUM_CONSTANT(RESOLUTION_4096);
BIND_ENUM_CONSTANT(RESOLUTION_8192);
BIND_ENUM_CONSTANT(RESOLUTION_MAX);
+
+ BIND_ENUM_CONSTANT(UPDATE_MODE_WHEN_MOVED);
+ BIND_ENUM_CONSTANT(UPDATE_MODE_ALWAYS);
}
void GPUParticlesCollisionHeightField::set_follow_camera_push_ratio(float p_follow_camera_push_ratio) {
diff --git a/servers/rendering_server.cpp b/servers/rendering_server.cpp
index 9ad19e4b38..f4b3634d99 100644
--- a/servers/rendering_server.cpp
+++ b/servers/rendering_server.cpp
@@ -2152,6 +2152,7 @@ void RenderingServer::_bind_methods() {
BIND_ENUM_CONSTANT(INSTANCE_MULTIMESH);
BIND_ENUM_CONSTANT(INSTANCE_IMMEDIATE);
BIND_ENUM_CONSTANT(INSTANCE_PARTICLES);
+ BIND_ENUM_CONSTANT(INSTANCE_PARTICLES_COLLISION);
BIND_ENUM_CONSTANT(INSTANCE_LIGHT);
BIND_ENUM_CONSTANT(INSTANCE_REFLECTION_PROBE);
BIND_ENUM_CONSTANT(INSTANCE_DECAL);