bjornbytes 9 years ago
parent
commit
21cee532c5
1 changed files with 3 additions and 1 deletions
  1. 3 1
      app/rattle.lua

+ 3 - 1
app/rattle.lua

@@ -16,7 +16,9 @@ function rattle:update(dt)
     if self.lastPosition then
       local delta = pos - self.lastPosition
       self.shake = _.lerp(self.shake, delta:len() * 2, 6 * dt)
-      controller:vibrate(math.min(.002 * self.shake, .0039))
+      if self.shake > .03 then
+        controller:vibrate(math.min((self.shake - .03) / 15, .003))
+      end
     end
 
     self.lastPosition = pos