Class GpuParticlesCollisionHeightField3D
- Namespace
- Godot
- Assembly
- GodotSharp.dll
A real-time heightmap-shaped 3D particle collision shape 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, this class is limited since heightmaps cannot represent overhangs (e.g. indoors or caves).
Note:
CollisionMode must be true
on the GpuParticles3D's process material for collision to work.
Note: Particle collision only affects GpuParticles3D, not CpuParticles3D.
[GodotClassName("GPUParticlesCollisionHeightField3D")]
public class GpuParticlesCollisionHeightField3D : GpuParticlesCollision3D, IDisposable
- Inheritance
-
GpuParticlesCollisionHeightField3D
- Implements
- Inherited Members
Constructors
GpuParticlesCollisionHeightField3D()
public GpuParticlesCollisionHeightField3D()
Properties
FollowCameraEnabled
If true
, 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 Resolution to improve performance if FollowCameraEnabled is true
.
public bool FollowCameraEnabled { get; set; }
Property Value
Resolution
Higher resolutions can represent small details more accurately in large scenes, at the cost of lower performance. If UpdateMode is Always, consider using the lowest resolution possible.
public GpuParticlesCollisionHeightField3D.ResolutionEnum Resolution { get; set; }
Property Value
Size
The collision heightmap's size in 3D units. To improve heightmap quality, Size should be set as small as possible while covering the parts of the scene you need.
public Vector3 Size { get; set; }
Property Value
UpdateMode
The update policy to use for the generated heightmap.
public GpuParticlesCollisionHeightField3D.UpdateModeEnum UpdateMode { get; set; }
Property Value
Methods
HasGodotClassMethod(in godot_string_name)
Check if the type contains a method with the given name. This method is used by Godot to check if a method exists before invoking it. Do not call or override this method.
protected override bool HasGodotClassMethod(in godot_string_name method)
Parameters
method
godot_string_nameName of the method to check for.
Returns
HasGodotClassSignal(in godot_string_name)
Check if the type contains a signal with the given name. This method is used by Godot to check if a signal exists before raising it. Do not call or override this method.
protected override bool HasGodotClassSignal(in godot_string_name signal)
Parameters
signal
godot_string_nameName of the signal to check for.
Returns
InvokeGodotClassMethod(in godot_string_name, NativeVariantPtrArgs, out godot_variant)
Invokes the method with the given name, using the given arguments. This method is used by Godot to invoke methods from the engine side. Do not call or override this method.
protected override bool InvokeGodotClassMethod(in godot_string_name method, NativeVariantPtrArgs args, out godot_variant ret)
Parameters
method
godot_string_nameName of the method to invoke.
args
NativeVariantPtrArgsArguments to use with the invoked method.
ret
godot_variantValue returned by the invoked method.