Class PointAttractorForceData

java.lang.Object
foundry.veil.api.quasar.data.module.force.PointAttractorForceData
All Implemented Interfaces:
EditorAttributeProvider, ParticleModuleData

public final class PointAttractorForceData extends Object implements ParticleModuleData, EditorAttributeProvider
A force that attracts particles to a point.

Point attractor forces are forces that are applied in the direction of a point. They are useful for simulating gravity or other forces that pull particles towards a point. The strength of the force is determined by the strength parameter. The falloff parameter determines how quickly the force falls off with distance. (unused) The strengthByDistance parameter determines whether the strength of the force is multiplied by the distance from the point. If strengthByDistance is true, the strength of the force is multiplied by (1 - distance / range). If strengthByDistance is false, the strength of the force is not affected by distance. The range parameter determines the maximum distance from the point at which the force is applied. If the distance from the point is greater than the range, the force is not applied. The position parameter determines the position of the point. The position parameter can be a Vec3 or a Supplier Vec3. If the position parameter is a Vec3, the position of the point is fixed. If the position parameter is a Supplier Vec3, the position of the point is updated every tick. This allows the point to move.

  • Field Details

  • Constructor Details

    • PointAttractorForceData

      public PointAttractorForceData(org.joml.Vector3dc position, boolean localPosition, float range, float strength, boolean strengthByDistance, boolean invertDistanceModifier)
  • Method Details