예제 #1
0
 void updateWavePhysics()
 {
     //@times two: only one update at 30fps wasn't enough, the physics rate needs to stay below the actual frame-rate though, to avoid stuttering
     physicsTimePool += Time.deltaTime * 2;
     while (physicsTimePool > 1 / PHYSICS_UPDATES_PER_SECOND)
     {
         physicsTimePool -= 1 / PHYSICS_UPDATES_PER_SECOND;
         w.CalculateForces();
     }
 }