Skip to main content

2D Fluid

Use the 2D Fluid component to simulate realistic fluid dynamics in 2D space, enabling you to create effects such as fluid viscosity, buoyancy-driven object movement, gravity-driven fluid flow, and collision interactions between fluids and other objects.

Add the 2D Fluid Component

  1. Go to the Inspector panel
  2. Click the + Add Component button
  3. Go to 2D Physics
  4. Select 2D Fluid
add 2d fluid

Properties

2d fluid properties
PropertyDescription
ModeSelects the fluid simulation mode:
  • Flow Mode: Enables particle emission
  • Pool Mode: Pre-filled particles
Use Particle LifetimeEnables or disables particle lifetime. When enabled, particles are destroyed after a defined lifespan to manage performance and particle count.
Gravity ModifierControls the intensity of gravity on particles.
Start SizeSets the initial size of the particles. Larger values result in bigger particles, which can affect the appearance of water flow or droplets.
Damping RatioControls the reduction of particle speed over time, simulating resistance or drag. Higher values slow particles more quickly. The default value is 1.
ViscosityAdjusts the fluid's thickness or stickiness. Higher values simulate more viscous fluids like oil or paste, while lower values simulate water. The default value is 0.
Start SpeedSets the initial speed and direction of particles. The default value is (0, -1).
Flow SizeDefines the width or size of the water flow. Larger values create broader streams or flows of particles. The default value is 1.
Flow RateControls the number of particles emitted per second, simulating the intensity of the water flow. The default value is 5.
Start FlowCheckbox to start or stop the water flow. When checked, particles are emitted; when unchecked, emission stops. This is selected by default.
Enable CollisionEnables collision detection for particles, allowing them to interact with other 2D objects or collision bodies. This is selected by default.
Particle MaterialSpecifies the material applied to particles, defining their appearance (e.g., color, texture, transparency).
Fluid Surface MaterialAssigns the surface material for the fluid, which affects the appearance of the fluid's surface (e.g., reflections, shading).