Class GpuParticlesCollision3D
- Namespace
- Godot
- Assembly
- GodotSharp.dll
Particle collision shapes can be used to make particles stop or bounce against them.
Particle collision shapes work in real-time and can be moved, rotated and scaled during gameplay. Unlike attractors, non-uniform scaling of collision shapes is not supported.
Particle collision shapes can be temporarily disabled by hiding them.
Note: CollisionMode must be Rigid or HideOnContact on the GpuParticles3D's process material for collision to work.
Note: Particle collision only affects GpuParticles3D, not CpuParticles3D.
Note: Particles pushed by a collider that is being moved will not be interpolated, which can result in visible stuttering. This can be alleviated by setting FixedFps to 0
or a value that matches or exceeds the target framerate.
[GodotClassName("GPUParticlesCollision3D")]
public class GpuParticlesCollision3D : VisualInstance3D, IDisposable
- Inheritance
-
GpuParticlesCollision3D
- Implements
- Derived
- Inherited Members
Properties
CullMask
The particle rendering layers (Layers) that will be affected by the collision shape. By default, all particles that have CollisionMode set to Rigid or HideOnContact will be affected by a collision shape.
After configuring particle nodes accordingly, specific layers can be unchecked to prevent certain particles from being affected by attractors. For example, this can be used if you're using an attractor as part of a spell effect but don't want the attractor to affect unrelated weather particles at the same position.
Particle attraction can also be disabled on a per-process material basis by setting AttractorInteractionEnabled on the GpuParticles3D node.
public uint CullMask { 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.