The direction of the force; its length scales it.
The force's strength, in units per second squared, rolled per particle.
Optionalspace: BehaviorSpace
The space the direction is authored in; 'world' by default.
OptionalscaleWithEmitter: boolean
Whether the force scales with the emitter, as ForceOverLife.scaleWithEmitter; true by default. False for gravity, which pulls as hard on a scaled copy of an effect.
Readonly_direction in the simulation space, refreshed by frameUpdate.
Readonly_The emitter's transform this frame, refreshed by frameUpdate.
The force's strength, in units per second squared, rolled per particle.
OptionalpsLearned in initialize, so undefined until this behavior sees a particle.
Whether the force scales with the emitter, as ForceOverLife.scaleWithEmitter; true by default. False for gravity, which pulls as hard on a scaled copy of an effect.
The space the direction is authored in; 'world' by default.
The name the behavior is registered under in BehaviorTypes.
The direction of the force; its length scales it.
Set it from any Vector3Like, such as a Babylon Vector3; the value is copied.
The direction of the force; its length scales it.
Set it from any Vector3Like, such as a Babylon Vector3; the value is copied.
What the magnitude is multiplied by before it reaches the velocity: the
step, and the system's motionScale for a world force in a world-space
system that scales with the emitter. An unknown system (before
initialize) counts as world space.
A copy with the same settings that shares nothing mutable with this one.
Called once per step before this behavior updates the particles, with the step's length in seconds.
Called once per particle when it is emitted; see the interface's description for when.
Called when the system restarts (not when a looping system starts its next loop): forget state accumulated across steps, so the replay starts as the first play did.
The behavior's settings as plain data, with its type; see the interface's description.
Called once per live particle per step, with the step's length in seconds.
Optional bulk form of update, applied to particles[0..count).
The per-particle update is reached through one call site shared by every
behavior type, which leaves it megamorphic: V8 can neither inline it nor
specialise the generator calls inside. A behavior that implements this
instead gets one call per frame and a loop it owns, where those calls are
monomorphic. Implementations must skip dead particles (age >= life)
exactly as the per-particle path does, and must produce identical results.
Behaviors that do not implement it keep working unchanged. A subclass that overrides
update but not updateAll has its update called, not the inherited updateAll.
StaticfromReads ApplyForce.toJSON output; a field the JSON leaves out takes its default.
Apply a constant force along one direction to every particle, like gravity or wind.
magnitudeis rolled per particle when it is emitted: a ConstantValue pushes every particle equally, an IntervalValue gives each particle its own strength for its whole life, as Unity's Force over Lifetime does with Random Between Two Constants.The direction is authored in space: world axes by default, so gravity stays down however the emitter is turned, or the emitter's own axes with
'local'. The force scales with the emitter as ForceOverLife's does, unless scaleWithEmitter is false: gravity keeps its strength in world units however the emitter is scaled. Applies in every render mode.