Advertisement
Munchy2007

FixedUpdateGrounded

Mar 17th, 2016
21,230
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.34 KB | None | 0 0
  1.         var emissionRate = 0;
  2.         if(grounded)
  3.         {
  4.             body.drag = groundedDrag;
  5.             emissionRate = 10;
  6.         }
  7.         else
  8.         {
  9.             body.drag = 0.1f;
  10.             thrust /= 100f;
  11.             turnValue /= 100f;
  12.         }
  13.  
  14.         for(int i = 0; i<dustTrails.Length; i++)
  15.         {
  16.             var emission = dustTrails[i].emission;
  17.             emission.rate = new ParticleSystem.MinMaxCurve(emissionRate);
  18.         }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement