Worlds
Water and swimming
Two ways to make water
| Way | What it is |
|---|---|
| Water plugin | A Lake, River, Ocean or Custom water body from Place Actors. It looks like water, and players swim in it as it is. |
| Swim zone | A Trigger Box with the tag VRSwim. The box is the water and its top is the surface. You make the look. |
1. Water from the Water plugin
The Creator Kit turns the Water plugin on for you, so there is no plugin to find.
- In Place Actors, search for Water Body.
- Drag a Lake, River, Ocean or Custom water body into your level, and shape it.
- Build and Play Map in the Workshop panel, as for any map.
That is all. When the map loads, the game finds every water body and makes it swimmable on every player’s PC. Water that appears later in a session works too.
- Put the water over a dip. Shallow water over a flat floor looks clear and is hard to see.
- Custom water is swimmable down to 30 m under its surface. Give deep water a floor.
- In VR a lake costs far less than an ocean. For a pool or a pond, use a lake or custom water.
2. A Swim zone of your own
Any box can be water: a pool with your own water material, a fountain, a flooded room, water the plugin cannot shape.
- In Place Actors, search for Trigger Box and drag one into your level.
- Size it to the water. The box is the water, and its top is the surface.
- In its Details panel, find Tags (type Tags in the search box at the top of Details), add one, and type
VRSwim. - Put your own water mesh or plane at the top of the box, so players see the water. A Swim zone draws nothing by itself.
- Build and Play Map.
Players swim anywhere inside the box. You can turn the box round, but it always stays level: a tilted box acts as a level one.
3. How players swim
| On a monitor | In a headset | |
|---|---|---|
| Swim | W A S D, toward where you look | The stick swims at half speed toward where you look. Your arms do the rest. |
| Strokes | Pull your hands back through the water like a real stroke. Each stroke pushes you the other way, and you glide after it. A hand that holds something does not swim. | |
| Faster | Hold Left Shift | Strong strokes |
| Dive | Look down and swim forward | Look down and swim forward |
| Up and down | Space rises, C sinks | Jump rises (A on the right controller) |
| Get out | Swim at the surface into an edge at most 1.3 m above the water, with room to stand on top, and you climb out onto it. | |
Stop swimming and you float back up, with your head above the water.
Everyone sees you swim. On a monitor your whole avatar swims, treads water when you stop and does a fast crawl when you sprint. In a headset your legs kick, and your arms stay your own.
Something went wrong?
Players walk on top of the water
Something solid sits at the surface, usually the water mesh or plane you put on a Swim zone. Set its Collision Presets to NoCollision. Water plugin water lets players in by itself.
The Swim zone does nothing
Check the tag: VRSwim, in the Tags of the Trigger Box itself, not of one of its parts. It has to be a box: a Trigger Sphere or a Trigger Capsule does not count.
Players cannot get out of the water
An edge can be at most 1.3 m above the water, with a floor on top and room to stand. Lower the edge, or add a step or a ramp out of the water.