summaryrefslogtreecommitdiff
path: root/doc/classes/GPUParticlesCollisionHeightField3D.xml
diff options
context:
space:
mode:
Diffstat (limited to 'doc/classes/GPUParticlesCollisionHeightField3D.xml')
-rw-r--r--doc/classes/GPUParticlesCollisionHeightField3D.xml24
1 files changed, 21 insertions, 3 deletions
diff --git a/doc/classes/GPUParticlesCollisionHeightField3D.xml b/doc/classes/GPUParticlesCollisionHeightField3D.xml
index e7e14375d9..3fcad43efb 100644
--- a/doc/classes/GPUParticlesCollisionHeightField3D.xml
+++ b/doc/classes/GPUParticlesCollisionHeightField3D.xml
@@ -1,41 +1,59 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="GPUParticlesCollisionHeightField3D" inherits="GPUParticlesCollision3D" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
+ Real-time heightmap-shaped 3D particle attractor affecting [GPUParticles3D] nodes.
</brief_description>
<description>
+ Real-time heightmap-shaped 3D particle attractor affecting [GPUParticles3D] nodes.
+ Heightmap shapes allow for efficiently representing collisions for convex and concave objects with a single "floor" (such as terrain). This is less flexible than [GPUParticlesCollisionSDF3D], but it doesn't require a baking step.
+ [GPUParticlesCollisionHeightField3D] can also be regenerated in real-time when it is moved, when the camera moves, or even continuously. This makes [GPUParticlesCollisionHeightField3D] a good choice for weather effects such as rain and snow and games with highly dynamic geometry. However, since heightmaps cannot represent overhangs, [GPUParticlesCollisionHeightField3D] is not suited for indoor particle collision.
+ [b]Note:[/b] [member ParticlesMaterial.collision_enabled] must be [code]true[/code] on the [GPUParticles3D]'s process material for collision to work.
+ [b]Note:[/b] Particle collision only affects [GPUParticles3D], not [CPUParticles3D].
</description>
<tutorials>
</tutorials>
<members>
<member name="extents" type="Vector3" setter="set_extents" getter="get_extents" default="Vector3(1, 1, 1)">
+ The collision heightmap's extents in 3D units. To improve heightmap quality, [member extents] should be set as small as possible while covering the parts of the scene you need.
</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 name="follow_camera_enabled" type="bool" setter="set_follow_camera_enabled" getter="is_follow_camera_enabled" default="false">
+ If [code]true[/code], the [GPUParticlesCollisionHeightField3D] will follow the current camera in global space. The [GPUParticlesCollisionHeightField3D] does not need to be a child of the [Camera3D] node for this to work.
+ Following the camera has a performance cost, as it will force the heightmap to update whenever the camera moves. Consider lowering [member resolution] to improve performance if [member follow_camera_enabled] is [code]true[/code].
</member>
<member name="resolution" type="int" setter="set_resolution" getter="get_resolution" enum="GPUParticlesCollisionHeightField3D.Resolution" default="2">
+ Higher resolutions can represent small details more accurately in large scenes, at the cost of lower performance. If [member update_mode] is [constant UPDATE_MODE_ALWAYS], consider using the lowest resolution possible.
</member>
<member name="update_mode" type="int" setter="set_update_mode" getter="get_update_mode" enum="GPUParticlesCollisionHeightField3D.UpdateMode" default="0">
+ The update policy to use for the generated heightmap.
</member>
</members>
<constants>
<constant name="RESOLUTION_256" value="0" enum="Resolution">
+ Generate a 256×256 heightmap. Intended for small-scale scenes, or larger scenes with no distant particles.
</constant>
<constant name="RESOLUTION_512" value="1" enum="Resolution">
+ Generate a 512×512 heightmap. Intended for medium-scale scenes, or larger scenes with no distant particles.
</constant>
<constant name="RESOLUTION_1024" value="2" enum="Resolution">
+ Generate a 1024×1024 heightmap. Intended for large scenes with distant particles.
</constant>
<constant name="RESOLUTION_2048" value="3" enum="Resolution">
+ Generate a 2048×2048 heightmap. Intended for very large scenes with distant particles.
</constant>
<constant name="RESOLUTION_4096" value="4" enum="Resolution">
+ Generate a 4096×4096 heightmap. Intended for huge scenes with distant particles.
</constant>
<constant name="RESOLUTION_8192" value="5" enum="Resolution">
+ Generate a 8192×8192 heightmap. Intended for gigantic scenes with distant particles.
</constant>
<constant name="RESOLUTION_MAX" value="6" enum="Resolution">
+ Represents the size of the [enum Resolution] enum.
</constant>
<constant name="UPDATE_MODE_WHEN_MOVED" value="0" enum="UpdateMode">
+ Only update the heightmap when the [GPUParticlesCollisionHeightField3D] node is moved, or when the camera moves if [member follow_camera_enabled] is [code]true[/code]. An update can be forced by slightly moving the [GPUParticlesCollisionHeightField3D] in any direction.
</constant>
<constant name="UPDATE_MODE_ALWAYS" value="1" enum="UpdateMode">
+ Update the heightmap every frame. This has a significant performance cost. This update should only be used when geometry that particles can collide with changes significantly during gameplay.
</constant>
</constants>
</class>