Tide Controller

HoloOcean worlds have tide settings that can be configured, either with the scenario or real time with commands during simulation.

../../_images/tidesinaction.gif

Tide Options

Holoocean worlds have a tide configuration and command. This allows you to set either a consistent tide cycle in your world or use env.tide() commands to set or adjust the tide to whatever you want at any point. With the command, you can either set the tide water level by setting the absolute parameter to be True, or you can offset the current tide level by setting absolute to be False.

In a scenario

Amplitude is in cm and frequency is in ticks.

config = {
   "tide_cycle":{
         "active": True,
         "amplitude": ###,
         "frequency": ###,
      },
   }

Programmatically

Usage of commands.

env = holoocean.make("...")
#This would set the tide to 1 meter
env.tide(1, True)
#This would adjust the tide by -2 meters relative to its current position - setting the tide to -1 meter
env.tide(-2, False)

Example of pushing a button to raise tide by 10cm.

with holoocean.make("...") as env:
   while True:
      if 't' in pressed_keys:
         #Raise tide by 10cm
         env.tide(0.1, False)

Note

For more information on how to use this command, please refer to the API Documentation: TideCommand.