Entity key identifying this force source
single vector whose length encodes the strength
or use overload for direction with a separate magnitude — the direction will be normalized before scaling.
Apply a continuous force to the player for a limited duration.
After duration seconds the force is automatically removed.
Calling again with the same source resets the timer.
Entity key identifying this force source
how long the force lasts, in seconds
single vector whose length encodes the strength
or use overload for direction with a separate magnitude — the direction will be normalized before scaling.
Apply a one-shot impulse to the player entity. Multiple calls within the same frame are accumulated (summed).
a single vector whose length encodes the strength.
or use overload for direction with a separate magnitude — the direction will be normalized before scaling.
Push the player away from a point. Computes direction from
fromPosition to the player, applies falloff, and delegates
to applyImpulseToPlayer.
If the player is exactly at fromPosition, pushes upward.
world-space origin of the knockback (explosion center, enemy position, etc.)
base impulse strength
Optional radius: numbermax distance of effect (default: Infinity)
Optional falloff: KnockbackFalloffhow force decreases with distance (default: CONSTANT)
Apply a continuous repulsion force that pushes the player away from a point,
recalculating direction every tick as the player moves.
Remove with removeForceFromPlayer(source).
Negative magnitude = attraction (pulls toward the source).
Entity key identifying this force source
world-space origin of repulsion
base force strength
Optional radius: numbermax distance of effect (default: Infinity)
Optional falloff: KnockbackFalloffhow force decreases with distance (default: CONSTANT)
Apply a continuous force to the player from a given source entity. Multiple sources are accumulated: the registry sums all active forces and writes a single PBPhysicsCombinedForce component. Calling again with the same source replaces its previous force.