예제 #1
0
        // Token: 0x0600166B RID: 5739 RVA: 0x00084DCC File Offset: 0x000831CC
        public static float getWaterSurfaceElevation(WaterVolume volume, Vector3 point)
        {
            point.y += 1024f;
            Ray        ray = new Ray(point, new Vector3(0f, -1f, 0f));
            RaycastHit raycastHit;

            if (volume.box.Raycast(ray, out raycastHit, 2048f))
            {
                return(raycastHit.point.y);
            }
            return(0f);
        }
예제 #2
0
 public static bool isPointInsideVolume(Vector3 point, out WaterVolume volume)
 {
     for (int i = 0; i < WaterSystem.volumes.Count; i++)
     {
         volume = WaterSystem.volumes[i];
         if (WaterUtility.isPointInsideVolume(volume, point))
         {
             return(true);
         }
     }
     volume = null;
     return(false);
 }
예제 #3
0
        public static bool isPointInsideVolume(WaterVolume volume, Vector3 point)
        {
            Vector3 vector = volume.transform.InverseTransformPoint(point);

            return(Mathf.Abs(vector.x) < 0.5f && Mathf.Abs(vector.y) < 0.5f && Mathf.Abs(vector.z) < 0.5f);
        }
예제 #4
0
 public static void removeVolume(WaterVolume volume)
 {
     WaterSystem.volumes.Remove(volume);
 }
예제 #5
0
 public static void addVolume(WaterVolume volume)
 {
     WaterSystem.volumes.Add(volume);
 }