Ultimate Water 2D / Docs v1.0.0Web demo Back to website
DiffusionWorks/Documentation/Choose the right water and interaction setup

Choose the right water and interaction setup

Ultimate Water System 2D provides four water workflows for different cameras, scene compositions, and gameplay requirements. Choose the water type that matches the visible surface you need and whether characters or objects must interact with it. The following sections then show the complete component setup for common gameplay cases.

Choose the water presentation

Water type Choose it when… Interaction support
2D Water Body The game is viewed from the side and needs a waterline with an underwater region. Full sensors, buoyancy, currents, impact ripples, and wakes.
2.5D Water Body The scene uses a perspective camera and needs a real top surface extending into Z, as in an aquarium-style or angled side-view composition. Full interaction system, with perspective surface geometry and capture effects.
Fake Perspective 2D Water Gameplay remains orthographic, but the artwork needs the impression of a receding top surface. Full 2D interaction system; the projected strip is visual presentation.
Simple Water 2D A decorative pool, river, waterfall, or custom Bézier shape matters more than gameplay interaction. Visual authoring today; interactive support is planned for an upcoming update.

The three main water bodies share the same interaction model. Simple Water 2D is a separate visual workflow, so do not choose it for a character, buoyant object, or current-driven mechanic yet.

What an interactive object needs

An object needs a few pieces before it can detect and react to water. The exact combination depends on whether it is a physics object, a character, or something moved directly by a script.

Part What provides it
Water area The water body defines the space that counts as water. Exclusion Areas can carve dry spaces out of it.
Object shape A Collider2D gives the water a shape to detect.
Movement speed A Rigidbody2D provides velocity for physics objects. MotionTracker2D measures objects moved by a Transform or custom controller.
Water information WaterSensor2D reports whether the object is touching or submerged, where the surface is, and what currents or ripples affect it.
Movement response DWBuoyancy2D, DWFloatingPlatform2D, WaterCharacter2D, or your own controller decides how the object moves.
Visible response Impact ripples, wakes, splashes, and foam show the object’s effect on the surface. WaterRippleOverride can give one object different settings.

Before testing the object, enable Interactions on the water and include the object’s layer in Affect Layers. In Project Settings → Physics 2D, make sure that layer is allowed to interact with the water trigger’s layer. Finally, enable the impact-ripple and wake effects you want the object to produce.

Dynamic physics objects

For a crate, barrel, or other object that should physically float:

  1. Add a Collider2D that matches the object.
  2. Add a simulated Dynamic Rigidbody2D.
  3. Add Buoyancy 2D (DWBuoyancy2D) to sample submerged points and apply lift, drag, wave response, and current response.
  4. Add Water Ripple Override only when this object needs different entry, exit, or wake strength from the water defaults.
  5. Add WaterSensor2D only when gameplay code also needs explicit state, depth, or water events. Buoyancy itself does not require a character-style sensor workflow.

The Rigidbody provides motion and receives forces; Buoyancy provides the floating response. Motion Tracker is normally unnecessary for a Dynamic Rigidbody because the water can already read its velocity.

Characters and custom movement controllers

For a player or NPC that needs swimming or diving:

  1. Give the character a Collider2D and configure the physics body or collision system used by its controller.
  2. Add WaterSensor2D. For most characters, its collider-based calculation and configurable submersion thresholds provide enough control without additional sample transforms.
  3. Add the optional feet, waist, swim/chest, and head sample points only when the controller needs exact state transitions at specific parts of the character. Use Point Based or Hybrid sampling when those points should define the state.
  4. Add WaterCharacter2D when you want the supplied surface-swimming, diving, water-jump, gravity, current, and ripple calculations. It is a helper rather than a complete controller; its source is also a practical reference for building custom water handling around WaterSensor2D.
  5. Keep input, collision resolution, animation, and final velocity ownership in your own controller. Feed its movement through WaterCharacter2D as shown in the dynamic and kinematic controller samples, or reproduce only the parts your controller needs.
  6. Add MotionTracker2D when a kinematic or transform-driven controller does not expose reliable Rigidbody velocity. Select the mode that runs in the same update loop as the movement, or call SetExternalVelocity(...) when the controller already calculates the final velocity.

WaterSensor2D answers what is happening in the water. WaterCharacter2D helps calculate a response. Neither replaces the game’s complete character controller.

Transform-driven and kinematic objects

Motion Tracker 2D only supplies motion data for impact strength and wake generation. It does not add a collider, detect submersion by itself, apply buoyancy, move the object with currents, or decide how the object should respond.

The water can find a moving object in two ways. When the object has a Rigidbody2D, Unity reports it through normal 2D trigger contacts. When an object is moved only by its Transform, there is no physics body to send those contacts, so the water periodically searches its own area for eligible colliders instead.

For an object moved with Transform, animation, a spline, or custom kinematic code:

  1. Add a Collider2D so the water has a contact shape.
  2. If the object has a Kinematic Rigidbody2D, keep that component enabled. The Rigidbody allows Unity’s water trigger to detect the collider even though your controller, rather than physics forces, moves the object. Make sure the object’s layer is included in Affect Layers and that the 2D collision matrix allows contact with the water trigger.
  3. If the object has no Rigidbody2D, the water uses its manual-interaction scan, which is enabled by default. You normally do not need to configure generated trigger components or add a Rigidbody just for detection. Keep the object’s Collider2D on a layer included in Affect Layers, then add Motion Tracker in the next step so the water can measure its movement.
  4. Add MotionTracker2D. Use Update Delta when the transform is moved in Update or another rendered-frame loop. Use Fixed Delta when movement is applied in FixedUpdate. Use Rigidbody Velocity when movement comes from the Rigidbody2D. If the controller already calculates the final world-space velocity, call SetExternalVelocity(...) from that same movement loop instead of estimating it again.
  5. Add WaterSensor2D when the object or gameplay code needs submersion state, depth, forces, or entry/exit events. On a Transform-driven object, the sensor also tells Motion Tracker which water body the object is currently using.
  6. Add or write the actual response: WaterCharacter2D for a character, a dedicated floating behavior for a platform, or custom code that reads the sensor’s CurrentRaw, RippleForce, and surface values.
  7. Use WaterRippleOverride when the object’s visual impact should differ from the shared water settings.

An object that only needs to create splashes and wakes may stop after contact and motion tracking are configured. An object that must be pushed, float, swim, or react in gameplay also needs a response component or custom controller code.

Specialized setups

Goal Recommended setup
Stable rideable platform Collider2D + Floating Platform 2D. It follows sampled surface height, handles rider dip, and can use restrained ripple tilt.
Detect water without changing movement Collider2D + WaterSensor2D; read its state, samples, forces, and events from your own code.
Directional flow Add a Water Current module or current zones, then use buoyancy, the character helper, or custom sensor-force handling on affected objects.
Dry cave, room, or island Add Exclusion Areas to the owning water. Add ordinary colliders separately when the boundary must also block movement.
Many lightweight decorations Use Floating Debris for groups or Floating Props for individually placed artwork. These are rendered decorations rather than general-purpose physics bodies.
Controlled sprite reflection Add Sprite Reflection and configure the shared or per-object waterline used as its reflection axis.
Ambient water activity Use Random Ripples; use Light Rays for stylized underwater lighting.

Terms used throughout this guide

Term Meaning
Waterline The animated upper boundary used for surface contact and height sampling.
Underwater Height How far the interactive and visible underwater region extends below the waterline.
Depth (Z) How far a 2.5D top surface extends into the scene; it is different from an object’s submersion depth.
Ambient waves Continuous background movement of the waterline.
Impact ripples One-shot reactions to entry, exit, or an intentional scripted impact.
Wakes Repeated movement-driven ripples generated as an object travels near the surface.

Visible foam, shader ripples, mesh displacement, and CPU-sampled forces can be enabled or tuned independently. A strong-looking splash does not have to apply an equally strong gameplay force.