Force zones

In Obi, any collider can become a force zone. Particles inside the force zone will be applied force, acceleration or wind in the direction specified by the zone's type. They can also be used to modify the lifetime of emitted particles that go inside of them.

Helix-shaped distance field acting as a radial force zone on granular particles.

Setting up force zones

Add a ObiForceZone component to any ObiCollider in your scene to turn it into a force zone. The collider will now allow particles to go inside of it and be affected by the force zone.

This is how the ObiForceZone component inspector looks like:


Type

There's 4 types of force zones:

Directional:
A directional force zone will move particles in the collider's forward-facing direction: its local positive Z axis.

Radial:
A radial force zone will move particles towards the surface of the collider..

Vortex:
A vortical force zone will move particles in the direction orthogonal to the particle's velocity and the vector towards the surface of the collider.
Void:
A void force zone is slightly special, in that it won't change the velocity of particles: instead, it modifies their lifetime, which is useful for killing fluid or granular particles. To reduce the lifetime of particles, use a positive intensity. Using a negative intensity is also possible, this will extend the particle's lifetime.

Mode

There's 3 different ways for force zones to affect particles:

Force:
A mass-weighted acceleration. Given a force of the same intensity, heavy particles will be less affected than lighter particles.

Acceleration:
Change in velocity. All particles will be equally affected by an acceleration, regardless of their mass.

Wind:
Certain ObiActors (currently, Cloth, Fluids and Ropes/Rods) respond to wind forces, taking into account aerodynamic properties. Cloth and ropes will wave/undulate in the presence of wind, and the surface of fluids will be affected by drag if they have non-zero atmospheric drag.

Intensity

Intensity of the force/acceleration/wind inside this force zone. Negative values can be used, which will invert the direction of the force: directional zones with negative intensity will move particles towards the collider's back-facing direction (negative Z axis) and radial force zones with negative intensity will move particles away from the surface of the collider. In case of void zones, positive intensities will reduce the particle's lifetime while negative intensities will increase it.

Falloff

How much the force zone intensity decays as particles get closer to the surface of the collider.

Pulse Intensity

How much the force zone intensity randomly changes over time.

Pulse Frequency

How fast the force zone intensity randomly changes over time.

Pulse Seed

Seed for pulse random number generation.