Advertisement
BlueBear

FloatableWater.cs

Feb 12th, 2014
138
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.72 KB | None | 0 0
  1. using UnityEngine;
  2. using System.Collections;
  3.  
  4. [RequireComponent(typeof(BoxCollider))]
  5. public class FloatableWater : MonoBehaviour {
  6.  
  7.  
  8.    
  9.     //wave parameters
  10.     public float waveFreq1 = 0.0f;
  11.     public float waveXMotion1 = 0.08f;
  12.     public float waveYMotion1 = 0.015f;
  13.     public float waveFreq2 = 1.3f;
  14.     public float waveXMotion2 = 0.025f;
  15.     public float waveYMotion2 = 0.10f;
  16.     public float waveFreq3 = 0.3f;
  17.     public float waveXMotion3 = 0.125f;
  18.     public float waveYMotion3 = 0.03f;
  19.    
  20.     //how strong under water drag is compared to air drag
  21.     public float waterDragFactor = 8;
  22.  
  23.     // Use this for initialization
  24.     void Start () {
  25.         collider.isTrigger = true;
  26.     }
  27.    
  28.     // Update is called once per frame
  29.     void Update () {
  30.    
  31.     }
  32. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement