reckfellENGINE

GpuParticlesAttractor3D

Abstract base class for 3D particle attractors.

On this page
class GpuParticlesAttractor3DReckfellSharpInherits VisualInstance3D

Abstract base class for 3D particle attractors.

Particle attractors can be used to attract particles towards the attractor's origin, or to push them away from the attractor's origin. 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. Attractors can be temporarily disabled by hiding them, or by setting their GpuParticlesAttractor3D.Strength to 0.0. Note: Particle attractors only affect GpuParticles3D, not CpuParticles3D.

Declarations checked against C# SDK 1.0.0. Expand a name to see declarations and documentation.

Properties4

AttenuationProperty
# Attenuation
C#
public float Attenuation { get; set; }

Exponent shaping influence inside the region; use a sensible nonnegative value. Not radius or speed. The current shader applies it to influence magnitude before force; outside the sphere/box there is no contribution.

CullMaskProperty
# CullMask
C#
public uint CullMask { get; set; }

Selects emitters by render Layers, not gameplay physics layers. Response also requires a shared World3D, being inside the region and the material AttractorInteractionEnabled flag.

DirectionalityProperty
# Directionality
C#
public float Directionality { get; set; }

Blends force direction: 0 uses sphere/box center direction, 1 the attractor local -Z at positive Strength. Rotation changes the axis; negative strength reverses it. Region and falloff still apply.

StrengthProperty
# Strength
C#
public float Strength { get; set; }

Force coefficient. For nondirectional sphere/box, positive pulls toward the center and negative repels. Directionality and a field texture change the direction. Not direct velocity assignment or calibrated gameplay-body gravity.

Methods8

GetAttenuationfloat
# GetAttenuation
C#
public float GetAttenuation();

Returns Attenuation. Exponent shaping influence inside the region; use a sensible nonnegative value. Not radius or speed. The current shader applies it to influence magnitude before force; outside the sphere/box there is no contribution.

Returns float

Current Attenuation value; account for the described units and scope.

GetCullMaskuint
# GetCullMask
C#
public uint GetCullMask();

Returns CullMask. Selects emitters by render Layers, not gameplay physics layers. Response also requires a shared World3D, being inside the region and the material AttractorInteractionEnabled flag.

Returns uint

Current CullMask value; account for the described units and scope.

GetDirectionalityfloat
# GetDirectionality
C#
public float GetDirectionality();

Returns Directionality. Blends force direction: 0 uses sphere/box center direction, 1 the attractor local -Z at positive Strength. Rotation changes the axis; negative strength reverses it. Region and falloff still apply.

Returns float

Current Directionality value; account for the described units and scope.

GetStrengthfloat
# GetStrength
C#
public float GetStrength();

Returns Strength. Force coefficient. For nondirectional sphere/box, positive pulls toward the center and negative repels. Directionality and a field texture change the direction. Not direct velocity assignment or calibrated gameplay-body gravity.

Returns float

Current Strength value; account for the described units and scope.

SetAttenuationvoid
# SetAttenuation
C#
public void SetAttenuation(float attenuation);

Sets Attenuation. Exponent shaping influence inside the region; use a sensible nonnegative value. Not radius or speed. The current shader applies it to influence magnitude before force; outside the sphere/box there is no contribution.

Parameters
NameTypeDefault
attenuationfloat—
attenuation

Exponent shaping influence inside the region; use a sensible nonnegative value. Not radius or speed. The current shader applies it to influence magnitude before force; outside the sphere/box there is no contribution.

SetCullMaskvoid
# SetCullMask
C#
public void SetCullMask(uint mask);

Sets CullMask. Selects emitters by render Layers, not gameplay physics layers. Response also requires a shared World3D, being inside the region and the material AttractorInteractionEnabled flag.

Parameters
NameTypeDefault
maskuint—
mask

Selects emitters by render Layers, not gameplay physics layers. Response also requires a shared World3D, being inside the region and the material AttractorInteractionEnabled flag.

SetDirectionalityvoid
# SetDirectionality
C#
public void SetDirectionality(float amount);

Sets Directionality. Blends force direction: 0 uses sphere/box center direction, 1 the attractor local -Z at positive Strength. Rotation changes the axis; negative strength reverses it. Region and falloff still apply.

Parameters
NameTypeDefault
amountfloat—
amount

Blends force direction: 0 uses sphere/box center direction, 1 the attractor local -Z at positive Strength. Rotation changes the axis; negative strength reverses it. Region and falloff still apply.

SetStrengthvoid
# SetStrength
C#
public void SetStrength(float strength);

Sets Strength. Force coefficient. For nondirectional sphere/box, positive pulls toward the center and negative repels. Directionality and a field texture change the direction. Not direct velocity assignment or calibrated gameplay-body gravity.

Parameters
NameTypeDefault
strengthfloat—
strength

Force coefficient. For nondirectional sphere/box, positive pulls toward the center and negative repels. Directionality and a field texture change the direction. Not direct velocity assignment or calibrated gameplay-body gravity.

Reckfell Engine documentationBack to top ↑
QUICK LINKSGetting startedEntity hierarchyC# & .NET 10Scenes and prefabs
Reckfell guides and full API K
reckfellENGINE
RECKFELL ACCOUNT

Sign in

Sign in to your Reckfell account.

One account for the entire Reckfell platform.