Garry's Mod Wiki


  number Entity:WaterLevel()


Returns an integer that represents how deep in water the entity is.

This function will currently work on players only due to the way it is implemented in the engine. If you need to check interaction with water for regular entities you better use util.PointContents.
  • 0 - The entity isn't in water.

  • 1 - Slightly submerged (at least to the feet).

  • 2 - The majority of the entity is submerged (at least to the waist).

  • 3 - Completely submerged.


1 number
The water level.