Table of Contents

Class GpuParticlesAttractorVectorField3D

Namespace
Godot
Assembly
GodotSharp.dll

A box-shaped attractor with varying directions and strengths defined in it that influences particles from GpuParticles3D nodes.

Unlike GpuParticlesAttractorBox3D, GpuParticlesAttractorVectorField3D uses a Texture to affect attraction strength within the box. This can be used to create complex attraction scenarios where particles travel in different directions depending on their location. This can be useful for weather effects such as sandstorms.

Particle attractors work in real-time and can be moved, rotated and scaled during gameplay. Unlike collision shapes, non-uniform scaling of attractors is also supported.

Note: Particle attractors only affect GpuParticles3D, not CpuParticles3D.

[GodotClassName("GPUParticlesAttractorVectorField3D")]
public class GpuParticlesAttractorVectorField3D : GpuParticlesAttractor3D, IDisposable
Inheritance
GpuParticlesAttractorVectorField3D
Implements
Inherited Members

Constructors

GpuParticlesAttractorVectorField3D()

public GpuParticlesAttractorVectorField3D()

Properties

Size

The size of the vector field box in 3D units.

public Vector3 Size { get; set; }

Property Value

Vector3

Texture

The 3D texture to be used. Values are linearly interpolated between the texture's pixels.

Note: To get better performance, the 3D texture's resolution should reflect the Size of the attractor. Since particle attraction is usually low-frequency data, the texture can be kept at a low resolution such as 64×64×64.

public Texture3D Texture { get; set; }

Property Value

Texture3D

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_name

Name of the method to check for.

Returns

bool

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_name

Name of the signal to check for.

Returns

bool

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_name

Name of the method to invoke.

args NativeVariantPtrArgs

Arguments to use with the invoked method.

ret godot_variant

Value returned by the invoked method.

Returns

bool