the OscillatingParticle class extends DrawableParticle to include oscillation parameters such as amplitude, frequency, and angle, allowing it to move in a sinusoidal pattern around an anchor position. The UpdateOscillation method updates the particle's position based on the oscillation parameters and the elapsed time, creating a dynamic movement effect. The SetAnchorPosition method allows changing the anchor point around which the particle oscillates, providing flexibility in how the particle behaves within the simulation.
More...
|
|
void | UpdateOscillation (float deltaTime) |
|
void | SetAnchorPosition (Vector2 newAnchor) |
|
|
float | OscillationAmplitude = amplitude |
| | the amplitude of the oscillation,
|
|
float | OscillationFrequency = frequency |
| | the frequency of the oscillation, which determines how fast the particle oscillates around its anchor position.
|
|
float | OscillationAngle = angle |
|
Vector2 | anchorPosition = position |
|
|
float | _oscillationTime = 0f |
the OscillatingParticle class extends DrawableParticle to include oscillation parameters such as amplitude, frequency, and angle, allowing it to move in a sinusoidal pattern around an anchor position. The UpdateOscillation method updates the particle's position based on the oscillation parameters and the elapsed time, creating a dynamic movement effect. The SetAnchorPosition method allows changing the anchor point around which the particle oscillates, providing flexibility in how the particle behaves within the simulation.
- Parameters
-
| position | |
| mass | |
| isPinned | |
| color | |
| amplitude | |
| frequency | |
| angle | |
The documentation for this class was generated from the following file:
- PhysicsCSAlevlProject/Objects.Particles.cs