GpuParticlesAttractor3D
Abstract base class for 3D particle attractors.
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
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
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
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
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
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.
floatCurrent Attenuation value; account for the described units and scope.
GetCullMaskuint
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.
uintCurrent CullMask value; account for the described units and scope.
GetDirectionalityfloat
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.
floatCurrent Directionality value; account for the described units and scope.
GetStrengthfloat
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.
floatCurrent Strength value; account for the described units and scope.
SetAttenuationvoid
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.
| Name | Type | Default |
|---|---|---|
attenuation | float | — |
attenuationExponent 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
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.
| Name | Type | Default |
|---|---|---|
mask | uint | — |
maskSelects emitters by render Layers, not gameplay physics layers. Response also requires a shared World3D, being inside the region and the material AttractorInteractionEnabled flag.
SetDirectionalityvoid
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.
| Name | Type | Default |
|---|---|---|
amount | float | — |
amountBlends 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
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.
| Name | Type | Default |
|---|---|---|
strength | float | — |
strengthForce 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.