Water

Static methods

Method

Description

GetWaterDepth(position)

GetWaterLevel()

IsInWater(position)

Raycast(ray, range)

Casts a ray through the scene until it collides with the WaterLevel or a WaterVolume.

SetWaterLevel(height)

Details

class Water
static float GetWaterDepth(Vector3 position)
static float GetWaterLevel()
static bool IsInWater(Vector3 position)
static object Raycast(Ray ray, float range)

Casts a ray through the scene until it collides with the WaterLevel or a WaterVolume.

Parameters
  • ray – Test for collisions along this ray.

  • range – Look no further than this [meters].

Returns

A RaycastHit if a collision occurs along the ray; otherwise nil.

static void SetWaterLevel(float height)