ParticleFloat Force { get; set; }

book_4_sparkGenerated
code_blocksInput

Description

The Force property of the ParticleAttractor class specifies the strength of the attraction force applied to particles. This property is of type ParticleFloat, allowing for dynamic adjustments and animations of the force value over time.

Usage

To use the Force property, you can set it to a desired value to control how strongly particles are attracted to the target GameObject. This can be useful for creating effects where particles are drawn towards a specific point or object in the scene.

Example

// Example of setting the Force property on a ParticleAttractor
ParticleAttractor attractor = new ParticleAttractor();
attractor.Force = new ParticleFloat(5.0f); // Set the force to 5.0

// Optionally, animate the force over time
attractor.Force = new ParticleFloat(0.0f, 10.0f, 2.0f); // Animate from 0 to 10 over 2 seconds